MySQL Forums
Forum List  »  Newbie

AUTO_INCREMENT Problem.
Posted by: Steve Burrus
Date: April 27, 2015 03:26PM

Help! I am trying top use the auto-increment statement in a table :

create table if not exists my_table(id smallint NOT NULL AUTO_INCREMENT , MY_NAMES varchar(33) NOT NULL, PRIMARY KEY(id));

insert into my_table (MY_NAMES) values ('Barry', 'Elliott', 'Robin','Bob', 'Steven');

when I try to execute the "insert into" statement I always get this error saying that "the value count doesn't match the column count"! I did the "create table" statement exactly how I saw it done in a book. Where am I going wrong?

Options: ReplyQuote


Subject
Written By
Posted
AUTO_INCREMENT Problem.
April 27, 2015 03:26PM
April 27, 2015 04:39PM
April 28, 2015 05:37AM
April 28, 2015 09:07AM
April 28, 2015 04:14PM
April 28, 2015 05:05PM
April 29, 2015 05:29AM


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.