How to swap two column values in SQL?
In the following tutorial, we are learning about swapping two columns in SQL table.
Following example I am wrongly saved the data, and I need to swap these columns.
So now I want to swap these columns data.
Syntax
Following example I am wrongly saved the data, and I need to swap these columns.
Syntax
update table_name set column1=column2,column2=column1;
Example:
update Saved_LimitDetails set LLimit=ULimit,ULimit=LLimit;
After executing the about line the output is
Post a Comment for "How to swap two column values in SQL?"