Oracle中“不等于”的使用

在oracle中判断字段id不是“123”时,

select * from user where id<> '123'; 但是id为空的,却怎么也查询不出来。

原因是:字段为null的时候,只能通过is null或者is not null来判断。

这样写才是正确的: select * from user where id <> '123' or id is null;

Left join的on后条件不起作用的原因

on 后面的条件只能起链接俩个表的作用,不能作为过滤条件使用,过滤条件只能加在where 后面

原文地址:https://www.cnblogs.com/h-c-g/p/13601376.html