|
|
|
|
|
Re: How to delete data from all the tables with one Query? [message #633634 is a reply to message #633625] |
Mon, 23 February 2015 08:31 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
@OP,
Why delete? Better truncate the tables, it would reset the HWM(High water mark) back to zero. How tedious is it to develop the script to do so? As already suggested, you need to use *_TABLES view. Depends whether you want it for a schema or entire DB.
For example,
select 'truncate table ' || table_name || ';' from user_tables
If you don't have any other objects other than just tables, then just drop the user. Make sure you generate the DDL of all the tables using DBMS_METADATA. Recreate the user and execute the DDL script thus generated.
The question is too broad, could you narrow down to some specific requirement.
[Updated on: Mon, 23 February 2015 08:34] Report message to a moderator
|
|
|
|
|
|
|