I need to get the list of new ID inserted with a single query(these are autoincremental, I'm making a
INSERT INTO xtable(value1,value2,value3,value4) VALUES (val1,val2,val3,val4), (val1,val2,val3,val4), (val1,val2,val3,val4), (val1,val2,val3,val4), (val1,val2,val3,val4) So as you see in a single query im inserting 5 rows, how can I get these IDs? I don't want to make a select after insert query to get lastest IDS or scope because it could go wrong if it goes slows and another functionality makes also insert query, there is any way that in the same query INSERT it returns IDs of inserted rows? Thanks!