Automated Trigger To Require a WHERE Clause

  • john.jones (1/25/2011)


    We are going to use this.

    For all of the rreasons previously stated, I strongly recommend that you don't.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • sorry folks, I think you're all trying too hard. Think about it. People make mistakes. If an unwanted all-row update happens in a production environment, ok, stupid, and obviously not properly tested.

    But you can't prevent every possible error. Live with it.

  • Hi Rahul,

    I have i doubt on this query, if all the rows have "CASH" then how to work this query

  • Hi Rahul,

    Thanks for your article, but I have a doubt on this query, if all the rows have "CASH" columns only, then how this query works ?

  • Why not just compare @@RowCount against (select count(*) from TABLE)?

    When I query sys.dm_db_partition for some of my tables I have multiple rows returned whose row_count is either <= count(*).

    If I SUM these as the example shows the result is multiples of count(*).

    And Everytime @@RowCount = count(*).

Viewing 5 posts - 91 through 94 (of 94 total)

You must be logged in to reply to this topic. Login to reply