怎么清除一个表字段A,上一年的信息

解决方案 »

  1.   


    alter table tbl drop column A
      

  2.   


    删除这个字段alter table tbl drop column A
    清楚饿着一个字段的值:
    update tbl set A=null where 需要满足的条件
      

  3.   

    UPDATE TB SET A = NULL WHERE 条件
      

  4.   

    update A set A=null where year(A)=year(getdate())-1A列为日期列,条件为去年时,把A列设置为null
      

  5.   

    update tb set a=null where 日期列=year(getdate())-1