Is there a way to simulate the OUTPUT clause in MySQL, as we have a OUTPUT clause in SQL Server.
Here is the kind of query I have
UPDATE employee
SET empage = 10
OUTPUT INSERTED.empid
WHERE (empage < 10)
As I need to have this functionality for MySQL server database too.
Kindly suggest the best way to achieve this functionality.
employeetable, select and insert values into another table, and then update and unlockemployeetable.EDIT:
I have tried one scenario with InnoDb table, seems it works –
SELECT statement (FOR UPDATE clause)