Code:
DECLARE @TEMP TABLE
(
idnum int IDENTITY(1, 1),
col1 int,
col2 int
)
INSERT INTO @TEMP(col1, col2) VALUES(2,3)
INSERT INTO @TEMP(col1, col2) VALUES(5,6)
SELECT * FROM @TEMP
Can do I a swap of the values in col 1 and col2 in 1 update query? Or do I need to create a temp table?
Thanks.