Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: indirect SQL execution - kind of 'backquoting'
sybrandb_at_yahoo.com wrote:
> Christoph Kukulies <kuku_at_accms33.physik.rwth-aachen.de> wrote in message news:<2m9dhrFkl5v6U1_at_uni-berlin.de>... >
> > > begin > for i in (select table_name from dba_tables where owner = 'SOMEONE' ) loop > execute immediate 'drop table '||i.table_name'; > end loop; > end; > / > > works like a charm, you'll only need to open those manuals for that. > > Sybrand Bakker > Senior Oracle DBA
Sorry Sybrand, but that won't work since when querying DBA_TABLES you're most likely *not* 'SOMEONE', so you'll have to preceede the table name with the owner. Or set the current schema with alter session.
Besides that, the OP is not clear if this exercise is because there is actually something in the schema that he want's to keep. If not, why not just drop user cascade?
Cheers,
Holger Received on Thu Jul 22 2004 - 10:56:47 CDT
![]() |
![]() |