Are Both The Inserted And Deleted Tables Used In Update

[Solved] Are Both The Inserted And Deleted Tables Used In Update | Php - Code Explorer | yomemimo.com
Question : are both the inserted and deleted tables used in update trigger

Answered by : shy-seal-rpgytmlovlcu

Yes.
ex (table is empty to begin with)
INSERT INTO [dbo].[test_employee_table](letter)
values('a'),('b')
-inserted table count: 2
-deleted table count: 0
update [test_employee_table]
set letter = 'b' where letter = 'a'
-inserted table count: 1
-deleted table count: 1
delete from [test_employee_table]
where letter = 'b'
-inserted table count: 0
-deleted table count: 2

Source : | Last Update : Mon, 07 Mar 22

Answers related to are both the inserted and deleted tables used in update trigger

Code Explorer Popular Question For Php