How to delete the data of all tables of a user reserved the table structure?

zhaozj2021-02-16  101

A:

Too much, one is too much annoyed, is there a simple way?

Q:

SQL> Spool D: /Delete.sql sql> select 'truncate table' || Table_name || ';' from cat where table_type = Upper ('table'); sql> spool off; sql> @d: /delete.sql - Enforce the statement in the text through the @d: /delete.sql command

Note: Be sure to log in to the user who wants to empty as: Connect User / PSW is best to back up the database. Cold backup, or exp backups can not rollback due to truncate commands;

You can see the delete.sql file in d: /.

转载请注明原文地址:https://www.9cbs.com/read-10795.html

New Post(0)