/*
================================================================================
档案代号:bgn_file
档案名称:生产预算明细档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table bgn_file
(
bgn01       varchar2(10) NOT NULL,   /*版本                                   */
bgn012      varchar2(10) NOT NULL,   /*部门编号                               */
bgn013      varchar2(10) NOT NULL,   /*客户编号                               */
bgn014      varchar2(40) NOT NULL,   /*产品别/品号                            */
bgn02       number(5) NOT NULL,      /*预算生产年度                           */
bgn03       number(5) NOT NULL,      /*预算生产期别                           */
bgn04       number(15,3),            /*预算生产数量                           */
bgn05       number(20,6),            /*材料单价                               */
bgn06       number(20,6),            /*人工单价                               */
bgn07       number(20,6),            /*制费单价                               */
bgn08       number(20,6),            /*加工单价                               */
bgn09       varchar2(1),             /*No Use                                 */
bgn10       varchar2(1),             /*No Use                                 */
bgn11       varchar2(4) NOT NULL,    /*生产单位                               */
                                     /*生产单位   No.8563 031030              */
bgn11_fac   number(20,8) NOT NULL    /*生产单位/库存单位换算率                */
                                     /*生产单位/库存单位换算率 No.8563 031030 */
);

create unique index bgn_pk on bgn_file (bgn01,bgn012,bgn013,bgn014,bgn02,bgn11,bgn11_fac,bgn03);
alter table bgn_file add  constraint bgn_pk primary key  (bgn01,bgn012,bgn013,bgn014,bgn02,bgn11,bgn11
_fac,bgn03) enable validate;
grant select on bgn_file to public;
grant index on bgn_file to public;
grant update on bgn_file to public;
grant delete on bgn_file to public;
grant insert on bgn_file to public;