查询语句的怪问题,大家帮忙解释一下
我查询一个数据表,想将某列既不是null也不是空格的行查出来。可是不行:
例如:select old_dept,remark,dept_code,dept_name from cst_dept_syn where 1=1 and dept_name is not null and dept_name!=''
就啥也查不出来了。
如果我这样就能查出来, select old_dept,remark,dept_code,dept_name from cst_dept_syn where 1=1 and dept_name is not null and dept_name || ' '!=' '
真的不知道oracle是如何看待空字符串的。大家帮忙分析一下。