How to swap column value in SQL?
SQL interview questions and answers #7
Question:
Write an update statement to swap the column values without using a temporary tables.
Before Update:
After Update:
Answer:
UPDATE dbo.STUDENT
SET first_name = last_name,
last_name = first_name;