Use this:
ALTER TABLE users AUTO_INCREMENT=1001;
or if you haven’t already added an id column, also add it
ALTER TABLE users ADD id INT UNSIGNED NOT NULL AUTO_INCREMENT,
ADD INDEX (id);
More Related Contents:
- Get the new record primary key ID from MySQL insert query?
- Prevent auto increment on MySQL duplicate insert
- How to insert data to MySQL with auto-incremented column(field)?
- “INSERT IGNORE” vs “INSERT … ON DUPLICATE KEY UPDATE”
- How to make MySQL table primary key auto increment with some prefix
- How to do a batch insert in MySQL
- MySQL AUTO_INCREMENT does not ROLLBACK
- Get current AUTO_INCREMENT value for any table
- LAST_INSERT_ID() MySQL
- SQL: Creating a Relational table with 2 different auto_increment
- Can you access the auto increment value in MySQL within one statement?
- Add Auto-Increment ID to existing table?
- How to copy a row and insert in same table with a autoincrement field in MySQL?
- MySQL Error 1264: out of range value for column
- BULK INSERT in MYSQL
- Importing a CSV to MySQL with different date format
- How to insert values in table with foreign key using MySQL?
- Field ‘id’ doesn’t have a default value?
- MySQL: #1075 – Incorrect table definition; autoincrement vs another key?
- MySQL error 1241: Operand should contain 1 column(s)
- insert data from one table to another in mysql
- MySQL Insert & Joins
- How does MySQL Auto Increment work?
- Why does MySQL autoincrement increase on failed inserts?
- PHP mySQL – Insert new record into table with auto-increment on primary key
- MySQL optimizing INSERT speed being slowed down because of indices
- How to reuse auto_increment values? [duplicate]
- “Unknown column in ‘field list'”, but column does exist
- make an ID in a mysql table auto_increment (after the fact)
- Insert and set value with max()+1 problems