Skip to main content

Hi All,

 

I want to give  grant permission to tables which are more in number.

 

I have executed below logic , it is throwing below error “Encountered the symbol “GRANT” when expecting below “ 

Code used :

 

DECLARE

BEGIN

FOR R IN (SELECT TABLE_NAME FROM IC_TAB_LIST)

LOOP

    GRANT SELECT ON R.TABLE_NAME TO IFSAPP

END LOOP;

END

 

Here : IC_TAB_LIST = Table name, which has around 300 tables where i need to give permission.

 

Please suggest asap.

Hi @TechSriniG 

This May Helpful

 

DECLARE

BEGIN

FOR R IN (SELECT TABLE_NAME FROM IC_TAB_LIST)

LOOP

   EXECUTE IMMEDIATE 'GRANT SELECT ON '||R.TABLE_NAME||' TO IFSAPP';

END LOOP;

END


Thank you Shaan, its working


Hi @TechSriniG 

Happy to hear the issue was resolved. You can mark this question as solved now 🙂.

Thanks & Regards
Shan