How to set the initial value (for example for "id" column) that start from 1001??
I do a insert "INSERT INTO users (name, email) VALUES ('{$name}', '{$email}')";
Without specify the initial value.
How to set the initial value (for example for "id" column) that start from 1001??
I do a insert "INSERT INTO users (name, email) VALUES ('{$name}', '{$email}')";
Without specify the initial value.
Use this:
ALTER TABLE users AUTO_INCREMENT = 1001;
or if you haven't already id column, also add it
ALTER TABLE users ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,
ADD INDEX (id);