Link to home
Start Free TrialLog in
Avatar of jkavx
jkavx

asked on

Trigger fires with inserted/deleted tables empty


What does it mean when a trigger fire when @@rowcount = 0, and both the inserted and deleted tables are empty?

Thx.

jkavx
Avatar of leonstryker
leonstryker
Flag of United States of America image

@@rowcount = 0 means no rows were returned.  In your case it may mean nothing was inserted or delete.  How and where did you get this message?
Avatar of jkavx
jkavx

ASKER


I'm testing at the start of a trigger for @@rowcount.  This is a trigger on insert/update/delete.

So if I update a table and no transactions occur (Update Project set name = 'x' where 1=2), the trigger will still fire and @@rowcount will be 0?
ASKER CERTIFIED SOLUTION
Avatar of leonstryker
leonstryker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial