SQL中 IS NULL 和IS NOT NULL

1.在查询数据库的时候,会遇到这种情况,但是,只想拿到不为account_date不为null的数据   这时  用到关键字   IS NOT NULL  

反之   IS NULL

2. SQLserver ISNULL()函数   isnull(expr1,expr2)        expr1和expr2为同一种数据类型  expr1为null 返回expr2  expr1不为null 返回expr1

    MYSQL   IFNULL()函数      IFNULL(expr1,expr2)    expr1不为null 返回expr1  否则返回expr2    

  ORACLE(DB2)   NVL()函数      NVL(expr1,expr2)      expr1不为null 返回expr1  否则返回expr2

                

猜你喜欢

转载自www.cnblogs.com/Yzzzzzzzzz/p/9722271.html
今日推荐