问题
What is the easiest way to copy the all the values from a column in a table to another column in the same table?
回答1:
With a single statement (if the columns have the same datatype)
UPDATE <tablename>
SET <destination column name> = <source column name>
回答2:
This script will update ALL values in the field1 with the values from the field2 in the corresponding row
UPDATE table SET field1 = field2
来源:https://stackoverflow.com/questions/173717/sql-server-copying-column-within-table