Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: select into a command...

Re: select into a command...

From: Dave <x_at_x.com>
Date: Tue, 26 Jul 2005 22:02:02 GMT
Message-ID: <upyFe.77743$G8.62326@text.news.blueyonder.co.uk>

"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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US