0

I am using trigger after update , I created table to store the changes, I want record also the reason behind change , so when ever the trigger fires I want to update that specific record , is there a way to get that 'transaction ID' to be used when updating. like .. Update tblAudit set reason = 'some reason' where ??

Zakarie Abdallah
  • 342
  • 1
  • 6
  • 10

1 Answers1

0

Work on SQL Server 2016 or later

Use SELECT CURRENT_TRANSACTION_ID()

Nayanish Damania
  • 542
  • 5
  • 13