5、oracle迁移到postgres-oracle中使用的`nvl`函数更改为统一的`coalesce`函数
目录
- oracle迁移到postgres-oracle中使用的
nvl
函数更改为统一的coalesce
函数- 1、oracle的
nvl
函数 - 2、postgre的
coalesce
函数
- 1、oracle的
oracle迁移到postgres-oracle中使用的nvl
函数更改为统一的coalesce
函数
nvl
函数与coalesce
函数都是值非空时,给默认值,oracle中也存在coalesce
函数
1、oracle的nvl
函数
当成绩为空时,默认是0
select nvl(grade,0) from stu_grade;
2、postgre的coalesce
函数
当成绩为空时,默认是0
select coalesce(grade,0) from stu_grade;