Trigger for only updating specific column

  • sizal0234

    SSCrazy

    Points: 2078

    Hi,

    using Merge I can sync table A with Table B at ROW level. However 'how to update only specific column instead of the whole row'?

    Sincerely!

     

  • ScottPletcher

    SSC Guru

    Points: 98344

    In the WHEN MATCHED part of the MERGE, specify only the columns you want UPDATEd.

    SQL DBA,SQL Server MVP(07, 08, 09) Prosecutor James Blackburn, in closing argument in the Fatal Vision murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."

Viewing 2 posts - 1 through 2 (of 2 total)

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