UPDATE tb_name SET
    col1=xx,
    col2=xx,
    col3=xx,
    ....
WHERE 主键=xxx

解决方案 »

  1.   

    just  the way said by LS
      

  2.   

    update tb
    set col1 = ...,
        col2 = ...,
        col3 = col1 + col2,
        col4 = getdate()
      

  3.   

    当然可以,只要根据一个主键就可以执行UPDATE
      

  4.   

    update #tb set col1='',col2='',col3=''....
    where id=1
      

  5.   

    的确是更新列的,不过你可以指定条件如update tb set col1='a'更新tb表col1列的值全部为aupdate tb set col1='a' where pkid=1更新tb表col1列的值全部为a 条件是满足pkid列=1
      

  6.   

    如果各个列所要更新的条件不一样的话,那么只能分别写一条语句,比如
    update 表 set [col1] = '第一列' where [条件]='条件1'
    update 表 set [col2] = '第二列' where [条件]='条件2'
    update 表 set [col3] = '第三列' where [条件]='条件3'