I need to insert a number of rows(~100,000) into a table. The table has one column "Id" that is auto-incremented.
LAST_INSERT_ID(); returns the last auto-incremented id of the connection session, but is there any way of getting the LAST_INSERT_ID() of a mass insert?
For Example:
INSERT INTO MyTable VALUES (null, somedata),(null, somedata),(null, somedata),...
I know it isn't directly possible in MySQL, but is there any work-around?