`

DB2-大数据量表分区命令

阅读更多

SELECT  *  FROM SYSIBM.SYSDATAPARTITIONS where tabschema='TESTDB' and tabname='TEST_PARTITION'
===================================================
create table test_partition
(
   id                   BIGINT,
   event_type           VARCHAR(100),
   log_time_gmt         timestamp,
   log_date_gmt        DATE  generated as (date(log_time_gmt))
)
partition by range
   (log_date_gmt nulls last)
    (
     starting minvalue,
     starting '2010-05-01'   ending   '2015-12-31' every 1 month,
     ending maxvalue
    );
===================================================
Export 命令: 
connect to testdb user testuser using testpassword
export to c:\123.txt of del select id from test_partition
del 参数 是导出的一种格式
===================================================

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics