Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding multiple cascade paths
Message
 
 
À
22/08/2008 15:17:50
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01340693
Message ID:
01341278
Vues:
18
Hi Viv,

The '@@ROWCOUNT > 0' is not reliable way to check for # of inserted record. What if somebody adds one more INSERT trigger that would fire before yours? The following is better
IF NOT EXISTS ( SELECT 1 FROM Inserted )
>I added a check for @@ROWCOUNT > 0 in the trigger which cured the problem. So would, for instance. a DELETE trigger fire even if there were no actual deletions ?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform