Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table:

table:
id name email
1 kapil k@d.com
2 smith s@d.com
3 jhon j@d.com
4 scahin s@d.com


now let I deteled id: 3


and out put:
id name email
1 kapil k@d.com
2 smith s@d.com
4 scahin s@d.com


Now how can get which "id" I had deleted.

query in MSSQL
Posted

1 solution

You have to store the deleted id into some temp table so that you can get it back later. See http://blog.sqlauthority.com/2007/10/01/sql-server-2005-output-clause-example-and-explanation-with-insert-update-delete/[^]
 
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