/*
================================================================================
档案代号:bwg_file
档案名称:销售,报废,外运折合资料档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table bwg_file
(
bwg00       varchar2(1) NOT NULL,    /*类别                                   */
                                     /*类别: L:内销 F:外销 S:报废 T:外运      */
bwg01       varchar2(40) NOT NULL,   /*主件料号                               */
bwg02       date NOT NULL,           /*生效日期                               */
bwg03       number(5) NOT NULL,      /*序号                                   */
bwg04       varchar2(40),            /*料件编号                               */
bwg041      number(16,8),            /*组成用量                               */
bwg05       number(15,3),            /*折合数量                               */
                                     /*库存单位                               */
bwg011      number(5) NOT NULL       /*年度                                   */
);

create unique index bwg_pk on bwg_file (bwg00,bwg01,bwg02,bwg03,bwg011);
alter table bwg_file add  constraint bwg_pk primary key  (bwg00,bwg01,bwg02,bwg03,bwg011) enable validate;
grant select on bwg_file to public;
grant index on bwg_file to public;
grant update on bwg_file to public;
grant delete on bwg_file to public;
grant insert on bwg_file to public;