📜  对模式中的所有表进行 oracle 授权 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:02.029000             🧑  作者: 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;