MySQL Forums
Forum List  »  Newbie

Re: Cannot create table - cryptic error
Posted by: Peter Brawley
Date: December 03, 2018 10:00PM

In MySQL an automatically applied PK numeric value is called auto_increment, see https://dev.mysql.com/doc/refman/8.0/en/example-auto-increment.html, and would not be virtual. And the uid PK renders a unique index on uid entirely redundant. So you would have ...

create table tblcars ( 
  uid int unsigned primary key auto_increment, 
  make varchar(45) null, 
  model varchar(45) null, 
  year varchar(4) null
);



Edited 2 time(s). Last edit at 12/04/2018 09:12AM by Peter Brawley.

Options: ReplyQuote


Subject
Written By
Posted
Re: Cannot create table - cryptic error
December 03, 2018 10:00PM


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.