Click here to Skip to main content
15,895,283 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to write below query in MYSQL?
delete from table1
output deleted.* into table2
Posted

No tool is there to convert MSSQL to MYSQL.
You have to rewrite it.
 
Share this answer
 
Comments
Simon_Whale 3-Feb-15 6:42am    
and there is no equivalent of OUTPUT in mysql either
alok0000 3-Feb-15 6:50am    
How to write then ? If have to the above query in MYSQL
Sadly there is no equivalent of the MS SQL Output clause[^] in mySQL.

you will need to have a look at other alternatives

As I am not sure on how you want to handle this in your application I can suggest you have a look through this google search and pick one that meets your applications needs.

Google search : mysql output clause[^]
 
Share this answer
 
Comments
alok0000 3-Feb-15 7:01am    
I am writing SP in MYSQL i have to insert old rows 1 month past in another table. how could i achieve this by script or SP?
You could create a trigger on the table and then use the OLD table to populate Table2...
example[^] and reference[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900