1. 查询所有的分区表
SELECT * FROM DBA_TAB_PARTITIONS ;
2. 创建分区
alter table {TABLE_NAME} add partition SYS_P202403 values less than (TO_DATE('2024-03-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), partition SYS_P202404 values less than (TO_DATE('2024-04-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), partition SYS_P202405 values less than (TO_DATE('2024-05-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), partition SYS_P202406 values less than (TO_DATE('2024-06-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), partition SYS_P202407 values less than (TO_DATE('2024-07-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), partition SYS_P202408 values less than (TO_DATE('2024-08-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), partition SYS_P202409 values less than (TO_DATE('2024-09-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), partition SYS_P202410 values less than (TO_DATE('2024-10-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), partition SYS_P202411 values less than (TO_DATE('2024-11-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')), partition SYS_P202412 values less than (TO_DATE('2024-12-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'));
标签:00,less,SYYYY,笔记,2024,DATE,SQL,Oracle,DD From: https://www.cnblogs.com/dawenyang/p/18107850