标签:arch nec 日期时间 to_char 时间 char alt code partition
declare V_DATE VARCHAR2(8); CURSOR IV_DATE IS SELECT TO_CHAR(TO_DATE(‘20190903‘,‘YYYYMMDD‘)+LEVEL-1,‘YYYYMMDD‘) AS 日期时间段 FROM DUAL CONNECT BY LEVEL <= TO_DATE(‘20200101‘,‘YYYYMMDD‘)-TO_DATE(‘20190903‘,‘YYYYMMDD‘); BEGIN open IV_DATE; LOOP fetch IV_DATE into V_DATE; execute immediate ‘ALTER TABLE TB_ACCEPT_JOB_D ADD PARTITION P_‘|| V_DATE || ‘ VALUES (‘‘‘|| V_DATE || ‘‘‘)‘; END LOOP; close IV_DATE; END;
标签:arch nec 日期时间 to_char 时间 char alt code partition
原文地址:https://www.cnblogs.com/tmftmb/p/11442826.html