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: Is this possible to do with SQL Plus?

Re: Is this possible to do with SQL Plus?

From: Sybrand Bakker <postmaster_at_sybrandb.demon.nl>
Date: Wed, 11 Aug 1999 06:51:45 +0200
Message-ID: <934347115.7132.0.pluto.d4ee154e@news.demon.nl>


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

Original text of this message

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