ORA-01006: Bind variable does not exist
例:
EXECUTE IMMEDIATE 'SELECT * FROM EMP E WHERE E.EMPNO = :EMPNO'
USING 'TOM',26;
解释:
传的参数多余SQL中接收的参数个数。此例,本来只应该传入一个参数,而我却传了2个。
ORA-01008: Not all variables bound
例:
EXECUTE IMMEDIATE 'SELECT * FROM EMP E WHERE E.EMPNO = :EMPNO AND E.AGE = :AGE' USING 'TOM';
解释:
传的参数少余SQL中接收的参数个数。此例,本来应该传入2个参数,而我却只传了1个。