// *Cause: DML operation like insert, update, delete or select-for-update
// cannot be performed inside a query or under a PDML slave.
// *Action: Ensure that the offending DML operation is not performed or
// use an autonomous transaction to perform the DML operation within
// cannot be performed inside a query or under a PDML slave.
// *Action: Ensure that the offending DML operation is not performed or
// use an autonomous transaction to perform the DML operation within
// the query or PDML slave.
在一个select 语句中调用函数引起的,使用自治事务可以解决
pragma autonomous_transaction;