I have around 600 tables. How to drop list partition from oracle table without dropping table structure.
Asked
Active
Viewed 889 times
-2
-
[See the documentation.](https://docs.oracle.com/en/database/oracle/oracle-database/19/vldbg/maintenance-partition-tables-indexes.html#GUID-BAFFE31C-07A2-4ED6-BDCF-8ECB79D7FE7D) – Alex Poole Feb 17 '21 at 09:20
1 Answers
0
ALTER TABLE table DROP PARTITION partition_name;
or DELETE FROM table PARTITION(partition_name);
I understand that you want to drop them not truncate, otherwise, you must replace DROP by TRUNCATE.
If you want to remove all partitions automatically. Create a CURSOR, sharing information of ALL_TAB_PARTITIONS. After the CURSOR create a LOOP to move into the table partitions.
If that can helps you, ask me and I give you more details.

Vahram Danielyan
- 187
- 3
- 11