Using the following logic you can identify which action cased the trigger to fire
if exists (select 1 from deleted) and exists (select 1 from inserted)
print ‘Update’
if exists (select 1 from inserted) and not exists (select 1 from deleted)
print ‘Insert’
if exists (select 1 from deleted) and not exists (select 1 from inserted)
print ‘Delete’
Thursday, 7 June 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment