开发者

Move values from one column to other in Oracle table

开发者 https://www.devze.com 2023-01-22 15:07 出处:网络
I have around 100,000 re开发者_Go百科cords in my Oracle table. TableMaster ----------- TabID Column1

I have around 100,000 re开发者_Go百科cords in my Oracle table.

TableMaster
-----------
TabID
Column1
Column2

How do I update all the records so that Column1 values are moved to Column2, and Column2 values are moved to column1?


Would this work?

UPDATE TableMaster SET Column1 = Column2, Column2 = Column1


Modify the table, changing the column names.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号