不等于符号会把code为null的记录过滤掉 SELECT*FROMpersonWHEREsex='女'andcode!='xxx'; 解决方法: SELECT*FROMpersonWHEREsex='女'and(code!='xxx'orcodeisnull); 或 SELECT*FROMpersonWHEREsex='女'andNVL(code,0)!='xxx';