update tablename
set col2=col1

解决方案 »

  1.   

    update tablename set field1=field2
    请看看偶的问题:
    http://www.csdn.net/Expert/topic/481/481194.shtm
      

  2.   

    set rowcount 1000
    while exists (
    select * form tablename
    where col2<>col1 )begin
    update tablename
    set col2=col1
    where col2<>col1
    endset rowcount 0
      

  3.   

    如果可行的话,在使用col2的地方都换成col1好了,不用更新数据库
      

  4.   

    根据某个字段比如日期,对表进行分段update,可以减小资源消耗:
    update tablename
    set col2=col1
    where col3='segment'
      

  5.   

    renanme table_name to table_name1;create or replace view table_name
    as
    select col1, col1 col2 from table_name1;不用做Update.程序也不用变动.