2014-12-08 72 views

回答

7

你可以做一個循環,並通過動態SQL授予:

BEGIN 
    FOR aTab IN (SELECT table_name FROM all_tables WHERE owner = 'MY_SCHEMA') LOOP 
     execute IMMEDIATE 'GRANT ALL ON MY_SCHEMA.'||aTab.table_name||' TO MyUser'; 
    END LOOP; 
END; 
+0

正確的拼寫錯誤,請在「執行」立即 – 2015-07-27 09:59:29