Is it possible to copy data from column A to column B for all records in a table in SQL?
是否可以将SQL表中所有记录的数据从A列复制到B列?
2 个解决方案
#1
236
How about this
这个怎么样
UPDATE table SET columnB = columnA
This will update every row.
这将更新每一行。
#2
47
UPDATE table_name SET
destination_column_name=orig_column_name
WHERE condition_if_necessary
#1
236
How about this
这个怎么样
UPDATE table SET columnB = columnA
This will update every row.
这将更新每一行。
#2
47
UPDATE table_name SET
destination_column_name=orig_column_name
WHERE condition_if_necessary