MySQL Forums
Forum List  »  General

Re: Order of rows on inserting multiple rows
Posted by: Andrey Shcherbakov
Date: December 11, 2018 02:50AM

I'm need not only last inserted id, i need to map inserted values to their ids.
For example, i insert values ('dog'), ('cat'), ('cow') i one insert statement. And in my code i want to assign to each value its ID. Like this:
1 -> dog
2 -> cat
3 -> cow

If i insert simple values - that's ok - i can select them back. But i insert JSON documents and it is not good to make SELECT WHERE json IN (...). I even doubt that this will work...

So i'm looking for some elegant solution.

Options: ReplyQuote


Subject
Written By
Posted
Re: Order of rows on inserting multiple rows
December 11, 2018 02:50AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.