Bug #1072 What about an AUTO_INCREMENT extension "BY n"
Submitted: 18 Aug 2003 3:53 Modified: 21 Aug 2003 4:27
Reporter: Miklos Szabo Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:all OS:Any (all)
Assigned to: CPU Architecture:Any
Triage: D5 (Feature request)

[18 Aug 2003 3:53] Miklos Szabo
Description:
What about an AUTO_INCREMENT extension "BY n"
I need it for safety to have different ID's 
in several tables.

How to repeat:
E.g.
create table x (
  id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
  ...
);

Suggested fix:
-- could be extended to
create table x (
  id INT NOT NULL AUTO_INCREMENT BY 3 PRIMARY KEY,
  ...
);
Which would cause x.id to be 3,6,9, etc.
[21 Aug 2003 4:27] Peter Zaitsev
The above is usually done using ANSI SQL SEQUENCE functionality.
It allows you to do other nice things, such as share sequence among several tables, rotate numbers etc.

The SEQUENCE support is in MySQL ToDo, and it will come in one of then next MySQL versions.