car_deal_util/代码/数据库/建表/车商方案表.sql

60 lines
1.5 KiB
MySQL
Raw Normal View History

2019-12-20 08:45:57 +00:00
--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 '<EFBFBD><EFBFBD><EFBFBD>̷<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
-- Add comments to the columns
comment on column CAR_DEALER_SCHEME.the_year
is '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
comment on column CAR_DEALER_SCHEME.the_month
is '<EFBFBD>·<EFBFBD>';
comment on column CAR_DEALER_SCHEME.car_dealer_code
is '<EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD><EFBFBD><EFBFBD>';
comment on column CAR_DEALER_SCHEME.man_hour_price
is '<EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>׼';
comment on column CAR_DEALER_SCHEME.part_price
is '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>۸<EFBFBD>';
comment on column CAR_DEALER_SCHEME.claim_support
is '<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><EFBFBD>';
comment on column CAR_DEALER_SCHEME.scheme
is 'Ӫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
comment on column CAR_DEALER_SCHEME.is_qualified
is '<EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԥ<EFBFBD><EFBFBD>';
-- 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;