how to do multi insert and obtain ids
- by liysd
hi,
I want to insert some data into a table
(id PK autoincrement, val)
with use multi insert
INSERT INTO tab (val) VALUES (1), (2), (3)
Is it possible to obtain a table of last inserted ids?
I'm asking becouse I'm not sure if all will in this form: (n, n+1, n+2).
I use mysql inodb.