@Stu is correct, MySQL does not support an equivalent of Microsoft SQL Server's IDENTITY()
. You can't set the value of auto_increment_increment
for a specific table. It applies to all tables.
You can set auto_increment_increment
as a session variable before inserting into your tbl
table, then set it back to the default value after the insert. But you'd have to remember to do this every time.
In general, the feature of auto-increment primary keys varies a lot between different implementations of SQL. The SQL:2003 standard includes more general syntax for generated primary key values, but MySQL does not support that syntax.
You might like to use PostgreSQL instead of MySQL if you need an open-source SQL database that has support for more SQL:2003 features.