开发者

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:

procedure issue(error in syntax)


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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜