如题所述
只是一个字段吗?那就用update更新该字段为空,delete的话会删除一行数据,不能删除某一字段 update table set 字段='' where 条件
温馨提示:答案为网友推荐,仅供参考
第1个回答 2012-07-07
是要清除表中某一字段的值?用update table set 字段=''
如果是删除表中某一字段,使用
ALTER TABLE table_name
DROP COLUMN column_name
如果是删除表中某一字段,使用
ALTER TABLE table_name
DROP COLUMN column_name
第2个回答 推荐于2017-10-09
1. 删除字段:
alter table tablename drop column field;
注:tablename 需要删除字段的表名 ; field 需要删除的字段
2. 添加字段:
alter table tablename Add column field int not null default 0;
alter table tablename drop column field;
注:tablename 需要删除字段的表名 ; field 需要删除的字段
2. 添加字段:
alter table tablename Add column field int not null default 0;
第3个回答 2012-07-06
直接设计表格 删除