字符型字段,值为空,如何用SQL语句判断此字段值为空?

skytears 2004-09-24 05:19:29
字符型字段,值为空,如何用SQL语句判断此字段值为空?
...全文
402 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ITpassport 2004-09-25
  • 打赏
  • 举报
回复
select * from table where Trim(colname) is null;
select * from table where Trim(colname) is not null;
select * from table where Trim(colname)='';
select * from table where Trim(colname) is nothing;

dinya2003 2004-09-25
  • 打赏
  • 举报
回复
select * from tbname where trim(colname) is null;

这应该是包含那些是NULL的记录和包含有若干空格的的记录
zhaokeke2004 2004-09-25
  • 打赏
  • 举报
回复
select * from tbname where colname is null
select * from tbname where colname is not null
LGQDUCKY 2004-09-24
  • 打赏
  • 举报
回复
ORACLE不管什么字段类型,在SQL语句判断NULL都是

colname is null或colname is not null
bzszp 2004-09-24
  • 打赏
  • 举报
回复
只包含空格的
select * from tbname where trim(colname) is null;
bzszp 2004-09-24
  • 打赏
  • 举报
回复
select * from tbname where colname is null;

17,382

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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