转自https://www.2cto.com/database/201505/401960.html
Oracle中不等于号问题
在Oracle中,不等于号有几种方式:<>,!=,^=
例1、查询AGE不等于23的数据
select
*
from
test
where
age <> 23;
例2、查询NAME不为lisi的数据
select
*
from
test
where
name
!=
'lisi'
;
例3、null只能通过is null或者is not null来判断,其它操作符与null操作都是false。
select * from test where instr(concat(name,'xx'),'lisi') = 0; --查询name字段不等于'lisi'的记录
或
select * from test where nvl(name,'xx')<>'lisi';