Is it possible to get the auto incremented ids from a query which inserts multiple rows? eg:
INSERT INTO table (col1, col2) VALUES (1, 2), (3, 4), (5, 6);
Alteratively, is there a way to find the NEXT auto increment value WITHOUT inserting anything into the table?
Thanks
As far as I know auto_increment does not fill gaps between ids and the operation is atomic. So you can assume that they will be in a row.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With