Delete the data from All tables in Oracle
![](https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-ash3/560890_4495445708686_1600447496_n.jpg)
First you need to disable all the constraints, or at least foreign keys, if you don't do it, you can get an error unless you delete the tables in the right order. watch this post to disable them.
Disable and Enable All table constraints in Oracle
Now that you have disabled all the constraints, run the next pl/sql block that will delete all the data in all the tables. and as you don't have constraints, you will not get errors
begin for r in (select table_name from user_tables) LOOP execute immediate('delete '||r.table_name); END LOOP; end;
Comments
Post a Comment