oracle程序中的问号没有被执行
Question mark in oracle procedure is not getting executed
create or replace procedure user_modification (v_user in VARCHAR2, v_pwd in VARCHAR2) IS
user_name VARCHAR2 (20) :=v_user;
pwd VARCHAR2 (20) :=v_pwd;
Begin
--logic would be here
stat:= 'ALTER USER' || user_name || 'IDENTIFIED BY ||' pwd' ||'' ;
由于密码是 =TEat?
,它在 ORACLE SQL Developer 中抛出 911 错误。请在这里帮忙。
您需要将密码用双引号引起来,例如:
stat:= 'ALTER USER ' || user_name || ' IDENTIFIED BY "' || pwd || '"';
(我还更正了您对单引号的使用,因为它们在示例代码中的位置不正确。)
预计到达时间:here's an example db<>fiddle 演示了在您有创建用户权限的情况下可以使用的代码。
create or replace procedure user_modification (v_user in VARCHAR2, v_pwd in VARCHAR2) IS
user_name VARCHAR2 (20) :=v_user;
pwd VARCHAR2 (20) :=v_pwd;
Begin
--logic would be here
stat:= 'ALTER USER' || user_name || 'IDENTIFIED BY ||' pwd' ||'' ;
由于密码是 =TEat?
,它在 ORACLE SQL Developer 中抛出 911 错误。请在这里帮忙。
您需要将密码用双引号引起来,例如:
stat:= 'ALTER USER ' || user_name || ' IDENTIFIED BY "' || pwd || '"';
(我还更正了您对单引号的使用,因为它们在示例代码中的位置不正确。)
预计到达时间:here's an example db<>fiddle 演示了在您有创建用户权限的情况下可以使用的代码。