/* ================================================================================ 档案代号:apsapm 档案名称:APS 单品取替代 档案目的: 上游档案: 下游档案: ============.========================.========================================== */ create table apsapm ( out_pid varchar2(32) NOT NULL, /*主件品号 */ in_pid varchar2(40) NOT NULL, /*元件编号 */ sub_pid varchar2(32) NOT NULL, /*取替代料品号 */ sb_aprio number(4), /*取替代优先顺序 */ in_qty number(16,4), /*投入量 */ eff_st date, /*生效日 */ eff_et date, /*失效日 */ out_qty number(16,4), /*产出量 */ shirnk number(16,4), /*元件损耗率 */ sub_type number(4), /*取替代属性 */ al_ratio number(16,4) /*以bom为主设定的替代比率 */ ); create unique index apsapm_pk on apsapm (out_pid,in_pid,sub_pid); alter table apsapm add constraint apsapm_pk primary key (out_pid,in_pid,sub_pid) enable validate; grant select on apsapm to public; grant index on apsapm to public; grant update on apsapm to public; grant delete on apsapm to public; grant insert on apsapm to public; |