Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Is this possible to do with SQL Plus?
The general approach before the PL/SQL era was (and it still works)
in sqlplus
set feedback off heading off pagesize 0
spool temp.sql
select 'whatever ddl'||table_name||';'
from user_tables;
spool off
start temp.sql
Of course this is just an example.
Hth,
Sybrand Bakker, Oracle DBA
PMG <peteg_at_garlic.com> wrote in message news:37B0FA60.A91CD24C_at_garlic.com...
> I tried the following in a script to be executed in SQL Plus, but it
> doesn't work:
>
> select decode(user, 'pete', 'grant select on table1 to joe', null) from
> dual;
>
> Is it possible to execute a DDL-type statement based upon a who is the
> owner thru SQL Plus, or do I need to do this thru a procedure?
>
> TIA
>
> Pete
>
Received on Tue Aug 10 1999 - 23:51:45 CDT
![]() |
![]() |