Sign up ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

It is fairly common knowledge that you should have


by default when creating new stored procedures.

Microsoft has changed the default template to include this in 2012. I thought this should be the same for triggers, yet it is not included in the template.

Is this intentional or just an oversight?

share|improve this question
If you ever edit values via the SSMS table editor this is required for triggers otherwise the extra row count message from the trigger confuses it –  Martin Smith Jul 19 '12 at 13:05
it's an oversight most likely. Also see please –  gbn Jul 19 '12 at 14:21

1 Answer 1

up vote 11 down vote accepted

Personally, I would recommend it - I can't think of a reason not to, unless you have a trigger where you specifically want to call out the fact that it's doing additional work behind the scenes.

I wrote a short article about things to watch for when writing triggers, and this is one of them:

tl;dr version:

  1. Cut the chatter. Use NOCOUNT.
  2. Make sure your trigger can handle multiple rows.
  3. Prevent unbounded trigger cascading and recursion.
  4. Avoid horrible performance of the INSERTED and DELETED virtual tables.
share|improve this answer
URL is out of date. Here's the updated URL: –  Jonathon Watney Sep 24 at 16:47
Good catch. I just updated my site to Pelican a couple weeks ago. ;) –  db2 Sep 24 at 17:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.