droping table(s) [message #6486] |
Mon, 21 April 2003 08:12 |
sriki
Messages: 1 Registered: April 2003
|
Junior Member |
|
|
how to drop all the table(s) in the database at the sametime.
|
|
|
One Quick way ... [message #6505 is a reply to message #6486] |
Tue, 22 April 2003 12:15 |
Thomas G
Messages: 58 Registered: April 2003
|
Member |
|
|
... If they all belong to one user, and there are no triggers or packages or stuff ...
drop user xxxxx cascade;
create user xxxxx identified by yyyyy;
Be shure to also set the default tablespace and everything else you need, when you re-create the user.
|
|
|
Re: One Quick way ... [message #6512 is a reply to message #6486] |
Tue, 22 April 2003 18:48 |
Rajiv
Messages: 14 Registered: April 2001
|
Junior Member |
|
|
just write a script in which you can select all the tables from user_tables and then drop each table inside the loop.
|
|
|
Re: droping table(s) [message #6522 is a reply to message #6486] |
Wed, 23 April 2003 03:38 |
Jayasri
Messages: 28 Registered: July 2000
|
Junior Member |
|
|
spool a file with all the tables as below.
SQL> SET HEADING OFF
SQL> SPOOL C:DR.TXT
SQL> SELECT 'DROP TABLE '||TABLE_NAME||';' FROM
USER_TABLES WHERE TABLE_NAME LIKE 'E%';
SQL> SPOOL OFF.
Open DR.txt
This will have the select statement also. Remove the select statement.
Run the file in SQL prompt.
SQL> @C:DR.TXT
|
|
|