1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
| create table PERSONNEL_FQB ( rybh VARCHAR2(2000), bjzdrybh VARCHAR2(2000), bkjb VARCHAR2(2000), ryzlx VARCHAR2(2000), sfzh VARCHAR2(2000), xm VARCHAR2(2000), xmpy VARCHAR2(2000), wwxm VARCHAR2(2000), qtzjlx VARCHAR2(2000), qtzjlxhm VARCHAR2(2000), csrq DATE, xb VARCHAR2(2000), xjzdqh VARCHAR2(2000), zhxz VARCHAR2(2000), hjsf VARCHAR2(2000), hjxs VARCHAR2(2000), hjxz VARCHAR2(2000), ablx VARCHAR2(2000), abms VARCHAR2(2000), bkyy VARCHAR2(2000), spfyj VARCHAR2(2000), xjz VARCHAR2(2000), zp VARCHAR2(2000), zzdw VARCHAR2(2000), bkdw VARCHAR2(2000), bkmjjh VARCHAR2(2000), bkmjxm VARCHAR2(2000), lxdhgh VARCHAR2(2000), lxdhsj VARCHAR2(2000), lrmjdw VARCHAR2(2000), lrmjjh VARCHAR2(2000), lrmjxm VARCHAR2(2000), bksx VARCHAR2(2000), bkzt VARCHAR2(2000), sjly VARCHAR2(2000), zdrylbbj VARCHAR2(2000), rksj DATE default sysdate, --设置入库时间默认值为sysdate时间 zhxgsj VARCHAR2(2000), zxlb VARCHAR2(2000), zxlblog VARCHAR2(2000), sfzxxd VARCHAR2(2000), zxbkjb VARCHAR2(2000), sfbdry VARCHAR2(2000), czryzlb VARCHAR2(2000), exp1 VARCHAR2(2000), exp2 VARCHAR2(2000), exp3 VARCHAR2(2000) ) --指定表默认表空间 tablespace BFQ_DATA pctfree 10 initrans 1 maxtrans 255 storage ( initial 64K next 1M minextents 1 maxextents unlimited ) --将入库时间字段设置为表分区的条件 partition by range(rksj) ( --创建分区表空间 --注意需要先创建好所需要表空间 partition PERSONNEL_rksj_2010 values less than (TO_DATE('2010-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2010, partition PERSONNEL_rksj_2011 values less than (TO_DATE('2011-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2011, partition PERSONNEL_rksj_2012 values less than (TO_DATE('2012-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2012, partition PERSONNEL_rksj_2013 values less than (TO_DATE('2013-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2013, partition PERSONNEL_rksj_2014 values less than (TO_DATE('2014-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2014, partition PERSONNEL_rksj_2015 values less than (TO_DATE('2015-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2015, partition PERSONNEL_rksj_2016 values less than (TO_DATE('2016-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2016, partition PERSONNEL_rksj_2017 values less than (TO_DATE('2017-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2017, partition PERSONNEL_rksj_2018 values less than (TO_DATE('2018-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2018, partition PERSONNEL_rksj_2019 values less than (TO_DATE('2019-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2019, partition PERSONNEL_rksj_2020 values less than (TO_DATE('2020-01-01','yyyy-mm-dd')) tablespace PERSONNEL_2020 );
|