How to implement "RETURNING of PosgreSQL" efficiently in MySQL?

Viewed 18

PostgreSQL supports RETURNINIG which makes it easier to return the data from modified rows. Some databases do not provide similar function, such as MySQL.

So for MySQL, how can we implement it as much efficient as possible? An idea that I can thought is using a self defined function or store procedure, which accept an DML statement, and execute it with another automically generated query to return the modified rows.

I want to know wheteher it is practical (can the function or store procedure in MySQL return the result set like a select statement) and are there other better ideas?

0 Answers
Related