zoukankan      html  css  js  c++  java
  • sql中的等于和不等于, '=' ,'!=','<>','is null'....

    不等于:<> ,!=,~= ,^= 这四个符号据说都可以在oracle中表示不等于,但是试了之后发现<> ,!= ,^=是可以的~=不行,需要注意的是,只有<>是标准的sql语法,可以移植,其他的都是oracle平台的特性,移植性较差,所以开发中,尽量使用<>表示不等于

    等于:=不用多说,但是要进行null的等于判断时,须使用is null 或is not null,null只能通过is null或者is not null来判断,其它操作符与null操作都是false。 

    例子,select * from bl_ip_dt where amount <> 800,这条语句查不出amount等于null 的记录,

    select * from bl_ip_dt where amount <> 800 or amount is null 才是可以的

  • 相关阅读:
    asp.net 2.0 run
    Regular Expression
    assembly
    asp.net loading..
    session
    asp.net performance
    asp.net page order
    interface
    UVA 562 Dividing coins
    UVA 10003 Cutting Sticks
  • 原文地址:https://www.cnblogs.com/smallfa/p/8358222.html
Copyright © 2011-2022 走看看