Page 1 of 1
auto_increment by value
Posted: Wed Dec 16, 2009 10:13 pm
by daedalus__
i can't figure out how to say this right on google to get an answer
i want to auto_increment a field by 10 every new record. auto_increment 10 starts the auto_increment at 10.
:\

Re: auto_increment by value
Posted: Thu Dec 17, 2009 10:06 am
by Weirdan
If you're willing to accept that all tables would get the same increment step there's
server-wide system variable that defines increment step. Be warned though, that there were bugs involving setting this variable to anything but 1.
Anyway, why would you need this?
Re: auto_increment by value
Posted: Thu Dec 17, 2009 9:31 pm
by daedalus__
yeah i read about that but it isn't a good solution. i don't really need it but there are some places it would be useful.
Re: auto_increment by value
Posted: Thu Dec 17, 2009 10:08 pm
by daedalus__
man this has to be some kind of joke because sql server, access, and oracle support this feature but i can't find any documentation saying mysql does.
Re: auto_increment by value
Posted: Fri Dec 18, 2009 9:12 am
by VladSun
PGSQL supports it too
Anyway - what are you trying to do in general? Why do you need an increment step > 1?
Re: auto_increment by value
Posted: Fri Dec 18, 2009 1:20 pm
by daedalus__
i don't neeeed to. im making an acl and i want each group id number to be in increments of 10. though im sure it will be useful someday.. for something... haha