怎么检索为空的数据(text类型)

newslxw 2004-04-14 12:02:05
我想将a表中的字段content为null的全部检索出来
我试了一下用select * from a where isnull(content)和select * from a where isempty(content)但发现都不行
content为text类型
...全文
92 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
yjbnew 2004-04-14
  • 打赏
  • 举报
回复
select * from a where content is null or trim(content)=''
yjbnew 2004-04-14
  • 打赏
  • 举报
回复
select * from a where content is null or content=''
zjcxc 元老 2004-04-14
  • 打赏
  • 举报
回复
--上面的要改一下,如果要把0长度的也检索出来,就用:

select * from a where content is null or datalength(content)=0
zjcxc 元老 2004-04-14
  • 打赏
  • 举报
回复
--如果要把0长度的也检索出来,就用:
select * from a where datalength(content)=0
zjcxc 元老 2004-04-14
  • 打赏
  • 举报
回复
select * from a where content is null

34,838

社区成员

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

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