Reputation: 15
Is it possible to drop the table with condition?
For example:
DROP table table_name where (select column from table) = (select column from table2)
NOTE : Without PLSQL
Upvotes: 1
Views: 423
Reputation: 4129
I think the easiest option here would be to gather drop table statements using your conditions into a sort of script
select listagg('drop table ' || owner || '.' || table_name || ';', ' ') within group(order by 1) from all_tables where <your_condition>
and then execute it
Upvotes: 1
Reputation: 58772
No, you can't add where in drop table statement
You will get error ORA-00933: SQL command not properly ended
Upvotes: 3
Reputation: 1319
I think it is not possible.
Please read the Oracle documentation:
Upvotes: 1