Suppose, I write a single trigger for all the transactions, INSERT, UPDATE, DELETE. Is it possible to identify, which trigger(INSERT, UPDATE or DELETE) fires this trigger code?
You could check the number of rows in the inserted and deleted tables. If inserted is 0 then it's a delete, if deleted is 0 then it's an insert if both have records, it's an update.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.