sql server判斷是否為null


sql server

  替換null:isnull(arg,value)

  如:select isnull(price,0.0) from orders ,如果price為null的話,用0.0替換

  與null比較: is not null,is null

  如 select * from orders where price is null ,price等於null

  如: select * from orders where price is not null ,price不等於null

  Oracle

  替換null: nvl(arg,value)

  如: select nvl(price,0.0) form orders

  與null比較: is not null,is null

  如 select * from orders where price is null ,price等於null

  如: select * from orders where price is not null ,price不等於null


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM