Hi,
When you create a new table and set one field as auto_increment, does this field automatically become the primary key as well?
I tried modifying a table after I created it, with not much success.
1) I tried changing an existing field to auto_increment, didn't work.
2) I tried changing an existing field to primary key, didn't work.
3) I added a new column and set auto_increment, this worked.
4) Setting column #3 as primary key caused an error.
5) I tried adding a new column as primary key, but didn't work either.
I guess I'm confused about what can be done to an existing table/column and what can't.
Help please?
Thanks!
When you create a new table and set one field as auto_increment, does this field automatically become the primary key as well?
I tried modifying a table after I created it, with not much success.
1) I tried changing an existing field to auto_increment, didn't work.
2) I tried changing an existing field to primary key, didn't work.
3) I added a new column and set auto_increment, this worked.
4) Setting column #3 as primary key caused an error.
5) I tried adding a new column as primary key, but didn't work either.
I guess I'm confused about what can be done to an existing table/column and what can't.
Help please?
Thanks!