For example, I have a table for user registration:
CREATE TABLE IF NOT EXISTS test_user (
user_id int(10) unsigned NOT NULL AUTO_INCREMENT,
user_name varchar(50) NOT NULL,
PRIMARY KEY (user_id),
) ENGINE=InnoDB DEFAULT CHARSET=utf8
I want the user_id
field ID numbers to be continuous, without gaps.
Failed transactions will occupy some ID numbers, is there any way around this?