I need to auto_increment a field in MySQL that is not primary key
Posted
by behrk2
on Stack Overflow
See other posts from Stack Overflow
or by behrk2
Published on 2009-07-20T00:44:13Z
Indexed on
2010/05/21
6:10 UTC
Read the original article
Hit count: 284
Hey everyone,
Right now, I have a table whose primary key is an auto_increment field. However, I need to set the primary key as username, date (to ensure that there cannot be a duplicate username with a date).
I need the auto_increment field, however, in order to make changes to row information (adding and deleting).
What is normally done with this situation?
Thanks!
© Stack Overflow or respective owner