Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding multiple cascade paths
Message
 
 
General information
Forum:
Microsoft SQL Server
Category:
Database design
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01340693
Message ID:
01341278
Views:
16
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform