sql 语句提问? 有三个条件1 部门为0072 编号不为null3 编号不为空如何select?大家帮忙。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from 表 where 部门='007' and 编号 is not null and 编号<>'' select*from tbwhere部门='007'and 编号 is not null and 编号<>'' select * from 表 where rtrim(部门)='007' and 编号 is not null and 编号 <>'' select*from tbwhere部门='007'and isnull(编号,'')<>'' --来晚了select*from tbwhere部门='007'and 编号 is not null and 编号<>'' select * from 表 where 部门='007' and 编号 is not null and 编号 <>''就是这个 select * from 表 where 部门='007' and 编号 is not null and 编号 <>'' select * from 表 where 部门='007' and 编号 is not null and 编号<>'' select * from 表 where rtrim(部门)='007' and 编号 is not null and 编号 <>'' 不要用<>,会影响效率,直接用isnull(编号,'')>''即可select * from 表 where rtrim(部门)='007' and isnull(编号,'') > '' 跪求网页数据库和索引数据库的代码 关于多重级联路径 恶意修改数据的问题 问一个很长的查询串? 请教 科学计数问题,郁闷中...... 求GUID函数 表1里有两个字段如库房1、库房2,库房有专门的表2,表1的两个字段是表2中相应库房的代码,如何显示表一数据! 没事做,讨论点新鲜的 求助各位大侠一个关于查询记录总数目的问题 帮帮忙嘛高手 大家推荐一本sqlserver系统管理的好书吧 进来比较一下
*
from tb
where
部门='007'
and 编号 is not null
and 编号<>''
select * from 表 where rtrim(部门)='007' and 编号 is not null and 编号 <>''
*
from tb
where
部门='007'
and isnull(编号,'')<>''
select
*
from tb
where
部门='007'
and 编号 is not null
and 编号<>''
就是这个
select * from 表 where rtrim(部门)='007' and 编号 is not null and 编号 <>''