欧美国产另类久热|951超碰伊人久久|伊人影视久久久久|色婷婷亚洲小电影|色东京热69XX|婷婷玖玖深爱网|加勒比东京热网站|无码A级毛片在线观看|一级a毛一级a看|中文字幕人妻欧美

oracle建分區(qū)表
來源:易賢網 閱讀:1421 次 日期:2014-10-21 14:13:56
溫馨提示:易賢網小編為您整理了“oracle建分區(qū)表”,方便廣大網友查閱!

1、按月創(chuàng)建分區(qū)

create table t_mhdp

(

id varchar2(50) not null,

flt_aircode varchar2(4),

flt_number number(7),

flt_date date

) partition by range (flt_date)

(

partition part201105 values less than (to_date(' 2011-06-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian'))

tablespace ts_mhdp_1105

pctfree 10

initrans 1

maxtrans 255

storage

(

initial 64k

next 1m

minextents 1

maxextents unlimited

),

partition part201106 values less than (to_date(' 2011-07-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian'))

tablespace ts_mhdp_1106

pctfree 10

initrans 1

maxtrans 255

storage

(

initial 64k

next 1m

minextents 1

maxextents unlimited

),

partition part201107 values less than (to_date(' 2011-08-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian'))

tablespace ts_mhdp_1107

pctfree 10

initrans 1

maxtrans 255

storage

(

initial 64k

next 1m

minextents 1

maxextents unlimited

),

partition partdefault values less than (to_date(' 9999-12-30 00:00:00', 'syyyy-mm-dd hh24:mi:ss', 'nls_calendar=gregorian'))

tablespace ts_mhdp

pctfree 10

initrans 1

maxtrans 255

storage

(

initial 64k

next 1m

minextents 1

maxextents unlimited

)

);

2、創(chuàng)建全局索引

create index index_mhdp_pk on t_mhdp(id)

tablespace ts_index_mhdp

pctfree 10

initrans 2

maxtrans 255

storage

(

initial 64k

next 1m

minextents 1

maxextents unlimited

);

3、創(chuàng)建本地索引

create index index_mhdp_pk on t_mhdp(id) local (

partition part201105 tablespace ts_mhdp_index_1105,

partition part201106 tablespace ts_mhdp_index_1106,

partition part201107 tablespace ts_mhdp_index_1107,

partition partdefault tablespace ts_mhdp_index

);

更多信息請查看IT技術專欄

更多信息請查看數據庫
易賢網手機網站地址:oracle建分區(qū)表
關于我們 | 聯(lián)系我們 | 人才招聘 | 網站聲明 | 網站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點

版權所有:易賢網