The table should contain an updated row for the update trigger

Some time ago I was reading an article for Trigger in SQL Server, and he said that I can use the “Updated” logical table for updated rows ... And I got an error:

System.Data.SqlClient.SqlException: Invalid object name 'Updated'.

After some time, on google, I found out a few more messages that said that only two available logical tables are available: Inserted and Deleted ...

I'm confused ... What should I use, since my trigger relies on the Updated table containing the updated row, and use it to insert into another table or the same table with a new PK ...

Many thanks

+5
source share
1 answer

Inserted ( INSERT UPDATE) Deleted ( DELETE UPDATE ).

SQL Server Updated.

FOR UPDATE Deleted , Inserted .

+9

All Articles