How to identify which fields are get updated from updated record?,

Hi, I have a record that has been updated recently. Now I want to get a particular field that has been updated in record updation, How will I get the updated field with it's old value (field value before updating)?

Thank you.

more ▼

asked May 21, 2012 at 10:50 AM in Default

avatar image

4 2 2 4

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

If the update transaction has already happened, then your only way of finding out the old value is to either inspect the transaction logs, or to restore a copy of the data before the modification.

Going forward, you can access the values either by utilising the OUTPUT clause of the update statement, or by using DML triggers and referencing the `inserted` and `deleted` tables

more ▼

answered May 21, 2012 at 12:29 PM

avatar image

Kev Riley ♦♦
66.8k 48 65 81

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: May 21, 2012 at 10:50 AM

Seen: 687 times

Last Updated: May 21, 2012 at 02:29 PM

Copyright 2018 Redgate Software. Privacy Policy