当时用到的查找分区的sql,做一个记录
SELECT S.TABLE_NAME FROM (SELECT MAX(INSTR(T.PARTITION_NAME, '2018')) EXISTPAR2018, MAX(INSTR(T.PARTITION_NAME, '2017')) EXISTPAR2017, T.TABLE_NAME FROM USER_TAB_PARTITIONS T GROUP BY T.TABLE_NAME) S WHERE S.EXISTPAR2018 = 0 AND EXISTPAR2017 > 0;