July 2012
Intermediate to advanced
816 pages
27h 38m
English
As you just saw, the MERGE statement supports the OUTPUT clause to access the INSERTED and DELETED pseudo-tables, as well as a special $action string value that returns ‘INSERT’, ‘UPDATE’, or ‘DELETE’ according to the action performed for each row processed by the merge operation.
The results generated by the OUTPUT clause can be captured in another table or table variable using OUTPUT…INTO, making it possible to easily maintain historical records of changes in the database. However, because using OUTPUT…INTO dumps every row captured by the clause into the destination table or table variable, it is not possible to filter on this data.
INSERT OVER DML refers to a special syntax in ...
Read now
Unlock full access