declare l_sql varchar2(200); begin for c11 in (select distinct std_tbl from xxxxxx) loop l_sql := ' grant select, update, insert, delete on ' || c11.std_tbl || ' to user_yy; begin execute immediate l_sql; exception WHEN OTHERS THEN null; end; end loop; end; /
declare l_sql varchar2(200); begin for c11 in (select distinct std_tbl from CODER) loop l_sql := 'grant select,references on' || c11.std_tbl || 'to MEM';
begin execute immediate l_sql; exception WHEN OTHERS THEN null; end; end loop; end; /我执行了下,说表 和视图不存在
l_sql varchar2(200);
begin
for c11 in (select distinct std_tbl from xxxxxx) loop
l_sql := ' grant select, update, insert, delete on ' || c11.std_tbl || ' to user_yy;
begin
execute immediate l_sql;
exception
WHEN OTHERS THEN
null;
end;
end loop;
end;
/
l_sql varchar2(200);
begin
for c11 in (select distinct std_tbl from CODER) loop
l_sql := 'grant select,references on' || c11.std_tbl || 'to MEM';
begin
execute immediate l_sql;
exception
WHEN OTHERS THEN
null;
end;
end loop;
end;
/我执行了下,说表 和视图不存在