Is anyone able to point me in the direction of a tool/script that will drop all tables from a specified database connection? Ideally Java/JDBC.

I have a development database and don't have much control over it, but I can drop tables one by one. It takes time to do this, especially seeing as I need to look at the FKs etc.

An app that did a topological sort to find which order to delete the tables in would be great :)

link|improve this question

63% accept rate
What type of database is the server running? And I presume the "don't have much control over it" means you couldn't just do something like DROP DATABASE name (and maybe then CREATE DATABASE name if you intend to rebuild). – DMA57361 Sep 12 '11 at 11:53
This database is Oracle, though something generic would be great as I work with lots of databases. As for what I can do, I can do individual "drop table ..." style queries, but I don't think I can do "drop database ..." style, and don't want to risk it either :) – Rich Sep 12 '11 at 12:08
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.