Delete trigger does not catch table truncation
Posted
by Tomaz.tsql
on SQL Blogcasts
See other posts from SQL Blogcasts
or by Tomaz.tsql
Published on Thu, 30 Aug 2012 07:37:00 GMT
Indexed on
2012/08/30
9:43 UTC
Read the original article
Hit count: 170
Filed under:
Sample shows table truncation will not fire delete trigger. USE AdventureWorks; GO -- STAGING IF EXISTS (SELECT * FROM sys.objects WHERE name = 'est_del_trigger_log' AND type = 'U') DROP TABLE test_del_trigger_log; GO IF EXISTS (SELECT * FROM sys.objects WHERE name = 'est_del_trigger' AND type = 'U') DROP TABLE test_del_trigger; GO CREATE TABLE test_del_trigger (id INT IDENTITY(1,1) ,tkt VARCHAR(10) CONSTRAINT pk_test_del_trigger PRIMARY KEY (id) ); GO INSERT INTO...(read more)
© SQL Blogcasts or respective owner