以下程序:
create or replace
PROCEDURE ChangePassword
(
p_Name VARCHAR2,
p_Password VARCHAR2
)
AS
EXECUTE IMMEDIATE 'ALTER USER :a IDENTIFIED BY :b' USING p_Name, p_Password;
END;
编译成功,但执行时:
exec ChangePassword('TestUser', 'newPassword');
导致错误:
01935. 00000 - "missing user or role name"
*Cause: A user or role name was expected.
*Action: Specify a user or role name.
为什么?