postgresql 判断字段是否为空

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xiuxiuzhuanshu/article/details/78731189

select COALESCE(tran.rm_amt,0) rm_amt

select COALESCE(null, 0) as test

结果

test

0

猜你喜欢

转载自blog.csdn.net/xiuxiuzhuanshu/article/details/78731189