Trigger fires with inserted/deleted tables empty

Posted on 2005-04-29
Last Modified: 2008-02-26

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


Question by:jkavx
    LVL 29

    Expert Comment

    @@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?

    Author Comment


    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?
    LVL 29

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    After several days of searching and hunting for limited documentation, I wanted to share this guide to hopefully save someone the hassle of trying to figure this out on their own. I have tested this on Xendesktop 7.1 and PS 4.5 running simultaneous…
    Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now