Insert: Inserted table is created when an insert operation is performed and holds recently inserted data in the table.
Update: Both Inserted and Deleted tables are created when an update operation is performed. Inserted table holds the updated rows (new data) while deleted table holds the old data of the rows which are updated as a result of update statement.
Delete: Deleted table is created when delete operation is performed and holds recently deleted data from the table.
Inserted table holds the recently inserted values, in other words new data values. Hence recently added records are inserted into the Inserted table.
The following is an example of creating an inserted trigger on a table: EmpDetail
Now insert records into the “EmpDetail” table to see the data within the Inserted and Deleted magic table.
The Deleted table holds the recently deleted or updated values, in other words old data values. Hence the old updated and deleted records are inserted into the Deleted table.
The following is an example of creating an deleted trigger on a table: EmpDetail
Now update the record in the “