• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create a sequence in MySql5.0

 
kranthi chamarthi
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
In oracle we can create a sequence with the following statement
'CREATE SEQUENCE GLOBAL_ID
MINVALUE 1
START WITH 1
INCREMENT BY 1;'

How to create a sequence in MySql5.0?
Thanks in advance
 
Paul Campbell
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In MySQL you either handle it programmatically or you use the auto_increment value on your column.

your_column_id INT(4) NOT NULL AUTO_INCREMENT
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our JDBC question since this isn't about Oracle.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic