skyho
skyho

Reputation: 1903

How can I delete all tables from existings schema a database Oracle12

How to remove all tables from Oracle schema? For example, run a cmd script in Windows which creates a connection to the specified schema and then creates different tables and fills them with data.

And how to write a command that would check :

if anyone can write such a script, comment on the commands.

thanks.

Upvotes: 1

Views: 371

Answers (1)

Littlefoot
Littlefoot

Reputation: 142720

I understand mostly everything, except the purpose of creating "different tables" and inserting the same data into them.

Because, to me, it looks like

  • export current schema (use the original EXP utility or EXPDP, Export data pump)
  • drop that user
    • which will also drop all its tables, indexes, procedures, ...
  • create user once again
  • import contents of the previously exported data (use the original IMP utility or IMPDP, Import data pump)

Upvotes: 2

Related Questions