469,950 Members | 2,265 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,950 developers. It's quick & easy.

Remove all tables for user with one SQl statement?

Hi

How can I remove all tables
UserName.TblNam1
UserName.TblNam2
UserName.TblNam3
etc

with one SQL statement?

Thanks in advance
Jan
Dec 16 '05 #1
2 22347
1) Newsgroup is obsolete - please use comp.databases.oracle.server'

2) Is dropping the user at the same time allowed?
Dec 16 '05 #2
"Jan Doggen" <j.******@BLOCKqsa.nl> wrote in news:43a2ee48$0$11062
$e*******@news.xs4all.nl:
Hi

How can I remove all tables
UserName.TblNam1
UserName.TblNam2
UserName.TblNam3
etc

with one SQL statement?

Thanks in advance
Jan

An anonymous PL/SQL block...
begin
executute immediate 'drop table UserName.TblNam1';
executute immediate 'drop table UserName.TblNam2';
executute immediate 'drop table UserName.TblNam3';
end;
/

Or you could write a "dropalltables" stored procedure and run that.
Jan 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Peter Gorelczenko | last post: by
5 posts views Thread by Santiago Ordax Solivellas | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.