菜鸟菜问:SQL表里的“”与NULL

yan9299 2008-01-16 10:13:15
我要写个SQL语句,去除表里TYPE为“”和NULL的项。(注:表里TYPE字段里既有值为“”,也有值为NULL)
...全文
129 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
威尔亨特 2008-01-16
  • 打赏
  • 举报
回复
delete from tb where col = '' or col is null
netcup 2008-01-16
  • 打赏
  • 举报
回复
乌龟写的检索
delete from tb where col = '' or col is null

-狙击手- 2008-01-16
  • 打赏
  • 举报
回复
delete   
from tbl
where isnull(type,'')=''
dawugui 2008-01-16
  • 打赏
  • 举报
回复
select * from tb where type = '' or type is null
dawugui 2008-01-16
  • 打赏
  • 举报
回复
select * from tb where col = '' or col is null
xiaoku 2008-01-16
  • 打赏
  • 举报
回复
delete from tbl where isnull(type,'')=''

34,587

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧