用EXCEL来辅助吧,
1、先找出某表中的所有字段名称:select [name] from syscolumns where id = object_id('某表')
2、将查询结果直接复制到Excel中,如下图A列,然后在B1处输入以下公式,然后回车:
3、可以看到B1已生成对应的SQL语句了,然后把B1的公式应用至整列B,然后复制B列在数据库中执行一下就OK了。
如果这个字段的值是NULL,就可以删除啊
Delete from 表名 where 字段名 is null
Delete from 表名 where 字段名 is null
或者
Delete from 表名 where 字段名 =“”