472,133 Members | 1,183 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

Sequences in mysql

hi everyone
i wanted to know if we can have sequences in mysql as we have in oracle
i know one approach in which we create a table which has columns for sequence name and value but this requires a calls to the database to get the nextvalue and to increment the same.
i was wondering if anything else could be done to avoid this whole stuff
Jan 11 '07 #1
1 1980
4,258 Expert 4TB
In MySQL sequence columns are usually generated using the AUTO_INCREMENT option. That way you don't have to generate the sequence no yourself, but let MySQL do it for you with each INSERT into the table.

See also the MySQL documentation about this function at this link

Ronald :cool:
Jan 12 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by temp | last post: by
reply views Thread by Jim McAtee | last post: by
reply views Thread by Petr Matousek | last post: by
10 posts views Thread by Vilson farias | last post: by
4 posts views Thread by Hemant Shah | last post: by
3 posts views Thread by Ken | last post: by
4 posts views Thread by JJ | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.