我試圖創建一個程序,將刪除某個用戶的系統權限。當我編譯我的代碼,我得到「編譯錯誤」SQL過程刪除系統權限
create or replace procedure deactivate_user
(
p_username in varchar2
)
as
l_username varchar2(30):=upper(p_username);
cnmd varchar2(50);
begin
for rec (select privilege, admin_option from dba_sys_privs
where grantee = l_username) loop
cnmd := 'REVOKE '||rec.privilege||' from '||l_username;
execute immediate cnmd;
end loop;
end;
/
您正在使用什麼數據庫管理系統? – PinnyM 2013-02-11 20:46:57
它看起來像我對Oracle PL/SQL – 2013-02-11 20:47:13
錯誤說什麼? – SLaks 2013-02-11 20:57:47