60 lines
1.5 KiB
SQL
60 lines
1.5 KiB
SQL
--DROP TABLE CAR_DEALER_SCHEME;
|
|
-- Create table
|
|
create table CAR_DEALER_SCHEME
|
|
(
|
|
the_year VARCHAR2(4),
|
|
the_month VARCHAR2(2),
|
|
car_dealer_code VARCHAR2(20),
|
|
man_hour_price VARCHAR2(200 CHAR),
|
|
part_price VARCHAR2(200 CHAR),
|
|
claim_support VARCHAR2(200 CHAR),
|
|
scheme VARCHAR2(1000 CHAR),
|
|
is_qualified CHAR(2)
|
|
)
|
|
tablespace CAR_DEALER
|
|
pctfree 10
|
|
initrans 1
|
|
maxtrans 255
|
|
storage
|
|
(
|
|
initial 64K
|
|
next 1M
|
|
minextents 1
|
|
maxextents unlimited
|
|
);
|
|
-- Add comments to the table
|
|
comment on table CAR_DEALER_SCHEME
|
|
is '车商方案表';
|
|
-- Add comments to the columns
|
|
comment on column CAR_DEALER_SCHEME.the_year
|
|
is '年份';
|
|
comment on column CAR_DEALER_SCHEME.the_month
|
|
is '月份';
|
|
comment on column CAR_DEALER_SCHEME.car_dealer_code
|
|
is '车商代码';
|
|
comment on column CAR_DEALER_SCHEME.man_hour_price
|
|
is '工时标准';
|
|
comment on column CAR_DEALER_SCHEME.part_price
|
|
is '配件价格';
|
|
comment on column CAR_DEALER_SCHEME.claim_support
|
|
is '其他理赔支持';
|
|
comment on column CAR_DEALER_SCHEME.scheme
|
|
is '营销活动方案';
|
|
comment on column CAR_DEALER_SCHEME.is_qualified
|
|
is '是否达成预期';
|
|
-- Create/Recreate indexes
|
|
create index CAR_DEALER_SCHEME_IDX on CAR_DEALER_SCHEME (THE_YEAR, THE_MONTH, CAR_DEALER_CODE)
|
|
tablespace CAR_DEALER_IDX
|
|
pctfree 10
|
|
initrans 2
|
|
maxtrans 255
|
|
storage
|
|
(
|
|
initial 64K
|
|
next 1M
|
|
minextents 1
|
|
maxextents unlimited
|
|
);
|
|
-- Grant/Revoke object privileges
|
|
grant select on CAR_DEALER_SCHEME to DATACENTER;
|