Exporting only Drop Statements

I'm trying to export only the DROP statements of a selection of tables. I'm used to working with Toad for DB2 7.2 where I could select the tables, right click, select Drop Table, and then choose SQL script. I'm working in Toad for Oracle 16.2 and I see the export DDL tool but I can't seem to generate only the DROP statements.

Is there a way to only generate the DROP statements?


Hi Clement,

Yes, like this. The script will be copied to your clipboard.


Thank you, can't believe I missed that.

Do you know if it also works for indexes?

I'm sorry, that feature only exists for tables.

The easiest thing to do for other objects is:

  1. select the objects
  2. CTRL+C
  3. Go to editor and paste
  4. click on the end of one of the lines. Hold ALT and drag down to select each line. Type a semicolon and it will appear on every line.
  5. repeat at the beginning of the line, typing "drop index "
  6. Use f5 to run the script (I skipped this step in the video)

here's a video:


1 Like

Thanks so much John.

Hey John,

First of all, what a great productivity tip for us, thank you!

Confirmation please:
For your step 4, on my keyboard, holding down the Alt key is what works for me, not the Windows command key (e.g. Windows Start key?)

Hah! Could be. For me, they are the same physical key. I updated the text above.

1 Like