Let's say I have a table with 10 rows of data, having the primary keys:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10.
I want to run in an
INSERT statement containing 5 new rows, these rows having the primary keys:
1, 2, 3, 4, 5.
My question: is there a way to have the primary keys of the five new rows set to the table's auto-increment value when I
INSERT these 5 rows into the table? I want to ignore their initial primary key values of
1,2,3,4,5 (otherwise they'd be duplicates)
Update: The reason just removing the primary key ID from the insert set would be difficult is that our actual data set is 15MB in size, not just five rows. I'm using MySQLWorkbench (mac) so if there is a way to export the rows WITHOUT the primary key ID please tell.
consider the format of an insert statement
insert into TBL [(col1,col2,...)] values (val1,val2,...)
so if your table has three columns id,a,b
insert into TBL (a,b) values (avalue,bvalue)