一个sql语句,如何将1列中的值复制到同一个表中的另一列

时间:2013-11-15 07:17:02

标签: sql

样品: 有一个包含3列的表,c1,c2和c3。

- c1 is the PK. 
- c2 is empty.
- c3 is same data type as c2 and empty.

如何编写一个sql语句来相应地将所有行的c3中的值复制到c2?

1 个答案:

答案 0 :(得分:4)

请尝试:

UPDATE YourTable
SET C2=C3