Home » SQL & PL/SQL » SQL & PL/SQL » drop table (oracle 10.2.0.1.0,Redhat Linux 4)
drop table [message #432208] Mon, 23 November 2009 00:26 Go to next message
goracle9
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
Frank
Messages: 7901
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
JRowbottom
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: Sat Feb 15 02:29:28 CST 2025