oracle中:
select distinct columnid from db2admin.yc_visitstat where columnid<>' ' and columnid is not null
select * from 表名 where 字段名<>' ' and 字段名 is not null
sqlserver,mysql,db2中:
select * from 表名 where 字段名 <>''
本文介绍了如何在Oracle、SQL Server、MySQL及DB2等不同数据库中,通过SQL语句查询字段值不为空且不等于空字符串的数据记录。具体包括使用<>''结合is not null来排除空字符串和NULL值的方法。
oracle中:
select distinct columnid from db2admin.yc_visitstat where columnid<>' ' and columnid is not null
select * from 表名 where 字段名<>' ' and 字段名 is not null
sqlserver,mysql,db2中:
select * from 表名 where 字段名 <>''
2673

被折叠的 条评论
为什么被折叠?