create or replace procedure test(v_from in varchar2, v_to in varchar2) is v_sql varchar2(1000); cursor v_cur is select t.* from dba_tables t where t.OWNER = v_from; begin for v_row in v_cur loop v_sql := 'grant select on ’ || v_from || ‘.’ || v_row.table_name || ’ to ’ || v_to; execute immediate v_sql; end loop; end test;
调用call test(‘DEM’,‘TEST’);
达梦批量授权
最新推荐文章于 2024-06-24 23:41:17 发布