Want to clear some concepts about SQL internals.
Suppose I have a table as:
---------tblXY-----------
X int
Y int
Now it has records as:
X Y
---
1 4
2 3
3 2
4 1
And I want the resulting table to be:
X Y
---
4 1
3 2
2 3
1 4
So I wrote the query as:
UPDATE tblXY
SET [X] = Y
,[Y] = X
and got the required result.
But how did it happened? I mean I'm setting X's value as Y's current value and at the very moment I'm setting Y's value as X's.