adilsonrapozojr
1/24/2018 - 9:15 PM

Partitioning tables

ALTER TABLE SCHEMA.TABLE  ADD PARTITION PART_024  STARTING(0,'2017-09-10')  ENDING (0,'2017-09-16')  IN TBS_D INDEX IN TBS_I
SELECT
substr(DATAPARTITIONNAME,1,20) DATAPARTITIONNAME, CARD, substr(LOWVALUE,1,30) LOWVALUE, LOWINCLUSIVE,
substr(HIGHVALUE,1,30) HIGHVALUE, HIGHINCLUSIVE FROM SYSCAT.DATAPARTITIONS WHERE
TABSCHEMA ='SCHEMA' AND TABNAME = 'TABLE' ORDER BY
DATAPARTITIONID DESC