How can detect an updated value in a Trigger specially in SQL Server 2005?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I found this answer true !!
An UPDATE trigger is used to perform an action after an update is made on a table.
In Part I the INSERT trigger watched for orders with a priority of ‘High.’ The UPDATE trigger watches for orders whose priority are changed from something else to High.
The IF statement checks to see if the Ord_Priority value was changed. If not we can save some time by exiting the trigger immediately.
The deleted table holds the pre-UPDATE values and inserted table holds the new values. When the tables are joined it is easy to tell when the priority changes from something else to High.
Reference