SQL Server: how to get the values before update from transaction log?

735 Views Asked by At

I mistakenly update a record in SQL server, is there any way to view the value before update?

As the transaction log is still here, can this value be viewed from the transaction log?

Thanks.

1

There are 1 best solutions below

0
JoshuaG On

I suggest you to use SELECT to check your query before updating. But if you do Insert/Update/Delete, there is a way to see the records you've changed, that is OUTPUT

visit https://www.sqlservercentral.com/articles/the-output-clause-for-insert-and-delete-statements