MySQL Forums
Forum List  »  Newbie

Re: table with multiple primary key
Posted by: Rick James
Date: September 02, 2014 07:14PM

@Peter:

mysql> create table f619790(i int auto_increment);
ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key
mysql> create table f619790(i int auto_increment, INDEX(i));
Query OK, 0 rows affected (0.08 sec)

Notice how it said it must be defined as a "key", and did not say "PRIMARY KEY".

Options: ReplyQuote


Subject
Written By
Posted
September 01, 2014 11:03PM
September 02, 2014 12:27AM
Re: table with multiple primary key
September 02, 2014 07:14PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.