最初由 liuxnp 发布
[B]create table outp_bill_detail01
(
patient_id varchar2(10),
visit_id number(2),
item_no number(6),
item_class varchar2(1),
item_name varchar2(40),
item_code varchar2(10),
item_spec varchar2(20),
amount number(6,2),
units varchar2(8),
ordered_by varchar2(8),
performed_by varchar2(8),
costs number(8,2) constraint nn_cost not null,
charges number(8,2) constraint nn_charge not null,
billing_date_time date,
operator_no varchar2(4),
rcpt_no varchar2(8),
price number(8,3),
constraint pk_outp_bill_detail_01
primary key
(
patient_id,
visit_id,
item_no
))
tablespace tsp_inpbill_max
partition by range(billing_date_time)(
partition tsp_inpbill_00 values less than
(to_date('31-12-2000','dd-mm-yyyy')) tablespace tsp_inpbill_00,
partition tsp_inpbill_01 values less than
(to_date('31-12-2001','dd-mm-yyyy')) tablespace tsp_inpbill_01,
partition tsp_inpbill_02 values less than
(to_date('31-12-2002','dd-mm-yyyy')) tablespace tsp_inpbill_02,
partition tsp_inpbill_03 values less than
(to_date('31-12-2003','dd-mm-yyyy')) tablespace tsp_inpbill_03,
partition tsp_inpbill_max values less than
(maxvalue) tablespace tsp_inpbill_max
);
就是范围时间建分区,和上面的一样。 [/B]