码迷,mamicode.com
首页 > 数据库 > 详细

Oracle中“不等于”的使用

时间:2020-09-15 21:31:36      阅读:83      评论:0      收藏:0      [点我收藏+]

标签:art   作用   bsp   过滤   使用   select   怎么   tor   rac   

在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 后面

Oracle中“不等于”的使用

标签:art   作用   bsp   过滤   使用   select   怎么   tor   rac   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!