emptying all the tables in a database

sureshp

Member
Hi,

i want to keep only the schema in a database, is there anyway to delete the content of all the tables in that database.
 
Deleting all the data is definitely the slow way and no there is no one step tool for that. Far faster to dump a .df and build a new database, though.

Back before temp-tables we would keep around an empty database which a sort of generic table in it for building reports. By copying that DB, attaching it, using it, detaching it, and then just deleting the copy we eliminated 2/3 of the overhead in actually trying to clean up a copy for reuse.
 
Obviously the easiest method is, as Thomas say, to simply keep an empty db laying about at all times. Or create one on demand from a .df file.

But if you have configured your db with storage areas you might also consider using "proutil truncate area".
 
Back
Top