alter column width

  • When I alter a column length for a table, do I need to refresh its trigger?

    I asked this is because I am using RedGate tool SQL compare, I see in the synchronization script, besides the alter column statement, it also includes alter trigger statement.

    But nothing changed in the trigger, not clear why it using alter trigger ?

  • I think NO need for trigger refresh. However you might like to change the same to the other table, in case you are using triggers for auditing purpose.

  • sqlfriends (6/7/2012)


    When I alter a column length for a table, do I need to refresh its trigger?

    I asked this is because I am using RedGate tool SQL compare, I see in the synchronization script, besides the alter column statement, it also includes alter trigger statement.

    But nothing changed in the trigger, not clear why it using alter trigger ?

    I can't answer for Red Gate but my suspicion is that any alter of a table will cause a "refresh" on any view, trigger, etc, which is associated with the table just to be on the safe side.

    --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 3 posts - 1 through 3 (of 3 total)

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