Home » SQL & PL/SQL » SQL & PL/SQL » drop table (oracle,Redhat Linux 4)
drop table [message #432208] Mon, 23 November 2009 00:26 Go to next message
Messages: 136
Registered: December 2006
Senior Member
Dear All,

i would like to drop some of table from more than 2 uesrs in test database. 100's of table starts with 'sale_details_yymmdd'
part of name yymmdd will be changing

so i need to drop all table start with sale_details_yymmdd in a single sql statement using purge option

please help me urgently. Embarassed
Re: drop table [message #432209 is a reply to message #432208] Mon, 23 November 2009 00:44 Go to previous messageGo to next message
Messages: 7880
Registered: March 2000
Senior Member
First of all, how can this be urgent?
Secondly, where do these tables come from? Sounds suspiciously like dynamically generated tables; creating tables at runtime is a big NO-NO in Oracle.
To remove the tables, generate sql-commands by using sql. (Select 'drop table '||table_name||';' from user_tables where....)
Re: drop table [message #432262 is a reply to message #432208] Mon, 23 November 2009 05:28 Go to previous message
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
I agree with frank - if your system has lots of tables called sales_details_<yymmdd> then you've got a poor system design.
Previous Topic: Why the index isn't used?
Next Topic: Designing Database with reporting tables
Goto Forum:

Current Time: Fri Aug 18 05:50:55 CDT 2017

Total time taken to generate the page: 0.09944 seconds