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

Home -> Community -> Usenet -> c.d.o.server -> Re: indirect SQL execution - kind of 'backquoting'

Re: indirect SQL execution - kind of 'backquoting'

From: Rene Nyffenegger <rene.nyffenegger_at_gmx.ch>
Date: 23 Jul 2004 20:12:42 GMT
Message-ID: <slrncg2s76.3u8.rene.nyffenegger@zhnt60m34.netarchitects.com>


> I must admit, I'm not very familar with SQL. I was trying to empty
> a database instance from all tables that were created by a
> specific creator using
>
> select ' drop table' || name || ';' from sys.systables
> where creator='SOMEONE' ;
>
> The output of that command, when executed, produces the desired result.
>
> Is there a way to "backquote" this commans, i.e. like in a Unix shell,
> as you are doing something like rm `cat file` and file contains a
> list of files.
>
> By now I'm redirecting this to another file and grep through it
> to fish out the drop commands.
>
> I'm sure there are more elegant methods.
>
> --
> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de

If you want to get rid of the tables and the user as well, you can also do a

  drop user cascade;

But then, everything the user has made so fare, is gone. This might be what you want or it might not.

Rene

-- 
  Rene Nyffenegger
  http://www.adp-gmbh.ch/
Received on Fri Jul 23 2004 - 15:12:42 CDT

Original text of this message

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