I have the trigger in one table and would like to read UserId value when a row is inserted, updated or deleted. How to do that? The code below does not work, I get
There is no updated dynamic table. There is just inserted and deleted. On an UPDATE command, the old data is stored in the deleted dynamic table, and the new values are stored in the inserted dynamic table.
Think of an UPDATE as a DELETE/INSERT combination.