1.包含null的表达式都为空

select salary*12+nvl(bonus,0) nvl是虑空函数 

2. null值永远!=null

select  * from emp  where bonus=null   得到的结果是0行被选中  正确的写法是  is null  或者 is not null

3.如果集合中含有null,不能使用not in  但是可以使用in 

4.null值的排序,在降序中null值是排在最前面的  因为oracle中默认null值是最大  解决的办法 

select * from emp order by bonus desc  nulls last;

5.组函数自动虑空;

 

相关文章:

  • 2022-02-19
  • 2021-10-25
  • 2021-11-22
  • 2019-07-19
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2021-05-29
猜你喜欢
  • 2022-12-23
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2021-07-28
  • 2022-12-23
相关资源
相似解决方案