Use a column both as source and target of a single update query
===

I'm trying to perform an update over a couple of fields in my table, in order to switch their values (thanks to some faulty logic in the piece of software generating the data, which is out of my contorol).

The query I'd use would look like this:

    BEGIN TRANSACTION
    SET @MyQuery = 'UPDATE myTable SET ColumnA = ColumnB, ColumnB = ColumnC WHERE myConditions'
    EXEC @MyQuery
    COMMIT TRANSACTION

Or, it would look like this:

    BEGIN TRANSACTION
    SET @MyQuery = 'UPDATE myTable SET ColumnA = ColumnB WHERE myConditions'
    SET @MyQuery2 = 'UPDATE myTable SET ColumnB = ColumnC WHERE myConditions'
    EXEC @MyQuery
    EXEC @MyQuery2
    COMMIT TRANSACTION

I'm pretty sure splitting up the queries guarantees the result I want, but it would be much easier (less all-around editing) if I could safely assume a single query would be solid.

Would the former query achieve the same result as the latter ?