3、oracle迁移到postgres-执行动态sql传参不同
目录
- oracle迁移到postgres-执行动态sql传参不同
- 1、oracle使用的是
:1
- 2、postgres使用的是
$1
- 1、oracle使用的是
oracle迁移到postgres-执行动态sql传参不同
在sql字符串中,会动态传入值,使用阿拉伯数据定义传参的个数。
1、oracle使用的是:1
execute immediate 'select * from sys_stu where stu_name = :1' using '小明';
2、postgres使用的是$1
execute immediate 'select * from sys_stu where stu_name = $1' using '小明';