📜  oracle grant select on schema - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:31.249000             🧑  作者: Mango

代码示例1
BEGIN
   FOR R IN (SELECT owner, table_name FROM all_tables 
             WHERE owner='OTHER_SCHEMA') LOOP
      EXECUTE IMMEDIATE 'GRANT SELECT, INSERT, UPDATE, DELETE ON ' ||
                         R.owner || '.' || R.table_name || ' TO MY_SCHEMA';
   END LOOP;
END;