比如 现在有表
student subject grade
---------------------------
student1 语文 80
student1 数学 70
student1 英语 60
student2 语文 90
student2 数学 80
student2 英语 100
------------------------------------------------------要把他变成这样 把student 那一列的内容都删除掉
student subject grade
---------------------------
         语文 80
         数学 70
         英语 60
         语文 90
         数学 80
         英语 100

解决方案 »

  1.   

    update tablename set student='' 
    你的student这个不是主键 没有指定不能为null吧?
      

  2.   

    update table set student = null;
      

  3.   


    SQL> select * from std;STUDENT         SUBJECT              GRADE
    --------------- --------------- ----------
    student1        语文                    80
    student1        数学                    70
    student1        英语                    60
    student2        语文                    90
    student2        数学                    80
    student2        英语                   1006 rows selectedSQL> update std set student=null;6 rows updatedSQL> commit;Commit completeSQL> select * from std;STUDENT         SUBJECT              GRADE
    --------------- --------------- ----------
                    语文                    80
                    数学                    70
                    英语                    60
                    语文                    90
                    数学                    80
                    英语                   1006 rows selectedSQL> 
      

  4.   

    update 表名 set student=‘’;