How to recover table after drop it in SQL Server

KaKa picture KaKa · Apr 7, 2014 · Viewed 13.4k times · Source

I drop a table in SQL Server using this code:

DROP TABLE temp

Now, I try to recover this table, but I don't know a solution.

Please, tell me a solution for this problem if you know.

Answer

Sharad picture Sharad · Apr 7, 2014

If DROP TABLE was executed inside the Transaction and it has not been committed then you can ROLLBACK. But if it isn't, then you need backup of your database. Recover your table from database. If backup is also not present, then search for 3rd party recovery tools.