这个plsql返回错误:
ORA-00922:缺少或无效选项
DECLARE
BEGIN
EXECUTE IMMEDIATE 'ALTER USER upper(:USERNAME) IDENTIFIED BY :NEW_PASSWORD REPLACE :OLD_PASSWORD';
END;
答案 0 :(得分:3)
ALTER所属的DDL语句不能包含绑定变量 - :USERNAME,:NEW_PASSWORD,:OLD_PASSWORD
使用
EXECUTE IMMEDIATE 'ALTER USER ' || upper(:USERNAME) || ' IDENTIFIED BY ' || :NEW_PASSWORD || ' REPLACE ' || :OLD_PASSWORD;
代替。