MySQL Forums
Forum List  »  Newbie

Re: AUTO_INCREMENT Problem.
Posted by: Phillip Ward
Date: April 28, 2015 05:37AM

So, to clarify, you changed this:

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

which was trying to push a list of five values into a single field ("MY_NAMES") in a single row, into this:

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

which inserts a single value into each of five separate rows.

Brackets matter.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
April 27, 2015 03:26PM
April 27, 2015 04:39PM
Re: AUTO_INCREMENT Problem.
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.