您的位置:首页 > 博客中心 > 数据库 >

sql server判断是否为null

时间:2022-03-14 03:42

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

热门排行

今日推荐

热门手游