• 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
Sheriff
Posts: 36020
427
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.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!