Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select into a command...
"Andrea" <no_at_tin.it> wrote in message
news:42e6af10$0$7030$5fc30a8_at_news.tiscali.it...
> Hi,
>
> i need make a grant on all table of a user (oracle 8.1.7) :
>
> grant all on myuser.table1 to public;
> grant all on myuser.table2 to public;
> grant all on myuser.table3 to public;
> ecc...
>
> and i would like to know if possible run a select command during a grant
> (select table_name from all_tables where owner = 'MYUSER')??
> otherwise i have to run a select with a spooler but i don't know what i do
> after this step..
>
> thanks very much!!
>
> bye
>
>
when logged in as mysuer
do
begin
for i in (select table_name from tabs) LOOP
execute immediate 'grant all on '||i.table_name||' to public';
end loop;
end;
/
Received on Tue Jul 26 2005 - 17:02:02 CDT