I have a table with multiple list partitions. I basically want to truncate all the partitions at once without having to mention the partition name. I did try using the plain truncate table tabl_name and it seems to work. I am quite new to partitions in oracle and am not too sure if this is the right way of doing it.
I also know from reading that i can delete multiple partitions using the alter table truncate partition command.
Thanks, Kavin
Yes, truncating the table truncates all partitions.
https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/TRUNCATE-TABLE.html#GUID-B76E5846-75B5-4876-98EC-439E15E4D8A4
If table is partitioned, then all partitions or subpartitions, as well as the LOB data and LOB index segments for each partition or subpartition, are truncated.
Note some of the documented side-effects also, such as UNUSABLE indexes being made USABLE.
2.1m questions
2.1m answers
60 comments
57.0k users