Page 1 of 1
auto-increment in a db without auto-incrememnt param
Posted: Tue May 22, 2007 5:12 pm
by Luke
I am working with some proprietary database that stores its databases in dbf format. I'm pretty sure you can't assign an auto-increment parameter to a field. How would you increment a column without that?
Posted: Tue May 22, 2007 5:20 pm
by Oren
Use MAX(), if that's possible, and just assign to the next row MAX() + 1.
Posted: Tue May 22, 2007 6:09 pm
by Luke
I guess the system I'm working on has a table called StoreKeys and every other table that needs an auto-increment value has a record in this table. There is a column called "maxvalue" that you use for the table's id values. Seems open for bugginess if you ask me.