procedure issue(error in syntax)
I have the procedure block:
begin
for i in (select grantee
,table_name
,privilege
from user_tab_privs_made
where grantee='TEST')
开发者_运维问答loop
revoke i.privilege on i.table_name from i.grantee;
end loop;
end;
and the error occurs:
You need to issue the revoke as EXECUTE IMMEDIATE, building a dynamic string with the command you want to be executed:
execute immediate 'revoke ' || i.privilege || ' on ' || i.table_name
|| ' from ' || i.grantee;
精彩评论