Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
For example:
id|old value|New value
11|Shrenik |shree

This has to be my output(using SQL-SERVER)
Please help me out with this.

What I have tried:

I tried creating triggers but failed to get previous updated value
Posted
Updated 19-Aug-22 4:19am
Comments
CHill60 19-Aug-22 10:15am    
Share the code of the trigger that you have tried

1 solution

When you write a trigger that is fired after an update you will get two tables of information - the original values in deleted and the new value in inserted. If you are not using MSSQL then there will be equivalent tables possibly with different names e.g. old and new

See Learn how to use the inserted and deleted tables with DML triggers to inspect changes. - SQL Server | Microsoft Docs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900