• L' Eomot Inversé (4/25/2013)


    Good question and explanation.

    Triggers that work only on single rows are a common problem, so anything that points out the pitfalls and warns people not to write them is a good thing.

    But I have a minor quibble: if this is a business rule, it should be enforced by the schema if possible, not by code; and this is a classic example of a rule that can be enforced by a check constraint.

    +1 🙂

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/