Home Forums SQL Server 2012 SQL Server 2012 - T-SQL how to update column city value from 'A' to 'B' and 'B' to 'A' in single query RE: how to update column city value from 'A' to 'B' and 'B' to 'A' in single query

  • T.Ashish (9/29/2013)


    I have faced the same situation in an interview where interviewer asked me a question on triggers.

    I tried my hard to convince him that we have INSTEAD OF and AFTER triggers in MS sql-server, and he was stuck to his point that we also have a BEFORE trigger in MS sql-server.

    That's when I'd smile, ask them if they have $5 to bet on it and a machine with Books Online on it to prove it. After I'd gotten my $5, I'd walk out of the interview. I've worked a places like that before and I don't want to do that again.

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