Search code examples
sqlsql-serversql-server-2005database-restore

SQL Server 2005: I just executed [delete from allMyHardWorkTable] what are my options?


I just must have skipped a thought and executed that command. What is the easiest way that I can setup a "New Query" template which will prevent me from doing this again.

Is there a way to create a stored procedure to make myself an undo?

I'm using SQL Server 2005.

Thank you everyone for all your help!


Solution

  • If you didn't execute the command within a transaction that you can rollback, you'll have to go to a backup my friend. If you don't have a backup of the DB data, you are unfortunately FUBAR'd :(