Rajanand home page
Rajanand
💻 Tech
Home
Spark
SQL
Python
Notes
Interview
Contact
Newsletter
Newsletter
Search...
Navigation
SQL
How to swap column value in SQL?
Have a great day! 🤩
⌘K
Interview Prep
Overview
SQL
Nth Highest Salary
Swap column values
Data Factory
ADF Migration
SQL
How to swap column value in SQL?
​
Question:
Write an update statement to swap the column values without using a temporary tables.
Before Update:
After Update:
​
Answer:
Copy
UPDATE
dbo
.
STUDENT
SET
first_name
=
last_name,
last_name
=
first_name;
How to get nth highest salary in SQL Server?
Previous
SSIS to ADF Migration Questions
Next
Assistant
Responses are generated using AI and may contain mistakes.