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
jkavxAsked:
Who is Participating?
 
leonstrykerConnect With a Mentor Commented:
Sounds right an event happened, but no data was actually affected.  Therefore @@rowcount = 0 and there are no records in the inserted and deleted tables.
0
 
leonstrykerCommented:
@@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?
0
 
jkavxAuthor Commented:

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?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.