0

Is it possible the insert trigger is not run while the values are inserted on the table? Anybody was experience this?

2
  • 1
    NOPE - triggers will be run - maybe your code isn't able to handle the multiple rows in Inserted - but the trigger will be fired - look for the problem in your code - not in SQL Server's triggering mechanism ... Commented Dec 20, 2013 at 20:47
  • I wouldn't say.. "it's not possible" but your code definitely is the more (much more) likely culprit. Commented Dec 20, 2013 at 21:31

1 Answer 1

2

No it's not possible, if you have the trigger set up correctly. Are you sure you've indicated you want the trigger to fire on an Insert? You have the option of specifying a trigger to fire on an Insert, Update, Delete or any combination.

Or the trigger could be disabled. Or there could be a Return statement in the first line of the trigger. I've seen people do that, as a way to disable a trigger.

Also, if you are inserting multiple rows into the table, you need to make sure your trigger is created correctly to handle that. Handling multiple inserts can be a bit more complicated than handling a single insert, and unexpected results could occur if you are not aware of the difference.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.