trigger when a specific column gets updated

  • Hi Team,

    It's my first time to use triggers so Is there a way to create a trigger when a specific column gets

    updated or inserted (not the whole table)?

  • Minnu,

    Please stop posting the same question worded differently multiple times. It wont get an answer any faster.

  • Minnu (12/5/2012)


    Hi Team,

    It's my first time to use triggers so....?

    So... From SSMS, press the F1 key to get into Books Online. Then search for CREATE TRIGGER and start reading. I'm not being sarcastic here. If it's truly your first time, take the opportunity to teach yourself all about triggers so you won't have to ask such questions in the future. To really do it right, create a test database and some tables to practice writting triggers on so you can actually see what they do.

    Triggers can be quite the tripping point in code and if you don't have a very firm grasp on what they actually do and how they work and how to use them, you're going to make some really huge and embarassing mistakes.

    --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)

Viewing 4 posts - 1 through 3 (of 3 total)

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