Re: AUTO_INCREMENT Problem.
OK, let's try this once more ...
In most DBMSs, the INSERT statement creates a single row in a table, using the values that you supply:
create table table1
( forename varchar( 30 )
, surname varchar( 30 )
);
insert into table1 values ( 'Fred', 'Flintstone' );
select * from table1 ;
+----------+------------+
| forename | surname |
+----------+------------+
| Fred | Flintstone |
+----------+------------+
This simplest syntax inserts into
every field in the row but you can, if you want, tell the database which fields you want to supply values for (and the rest will be left NULL or have a default value applied to them):
insert into table1 ( forename ) values ( 'Dino' );
select * from table1
order by 1 ;
+----------+------------+
| forename | surname |
+----------+------------+
| Dino | [NULL] |
| Fred | Flintstone |
+----------+------------+
MySQL has
extended the Insert statement to allow you to insert
multiple rows in a single
statement. You do this by providing a comma-separated list of "tuples", each of which can contain a comma-separated list of field values:
insert into table1 ( forename, surname )
values
( 'Wilma', 'Flintstone' )
, ( 'Barney', 'Rubble' )
, ( 'Betty', 'Rubble' )
;
select * from table1
order by 2, 1 ;
+----------+------------+
| forename | surname |
+----------+------------+
| Dino | [NULL] |
| Fred | Flintstone |
| Wilma | Flintstone |
| Barney | Rubble |
| Betty | Rubble |
+----------+------------+
http://dev.mysql.com/doc/refman/5.6/en/insert.html
Regards, Phill W.