Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining whether UPDATE or INSERT was called
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01467465
Message ID:
01467470
Views:
53
This message has been marked as the solution to the initial question of the thread.
OK, sorry....

If both INSERTED and DELETED have data, then you know an UPDATE fired (and at least one row was affected)

So....IF EXISTS (SELECT * FROM INSERTED) AND EXISTS ( SELECT * FROM DELETED) ....then you know the statement that fired was an UPDATE.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform