Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining whether UPDATE or INSERT was called
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01467465
Message ID:
01467470
Vues:
54
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform