/*
================================================================================
档案代号:var_file
档案名称:aps(万用取替代)
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table var_file
(
var01       varchar2(40) DEFAULT '' NOT NULL, /*元件编号*/
var02       varchar2(40) DEFAULT '' NOT NULL, /*取替代料品号*/
var03       number(5),               /*取替代优先顺序                         */
var04       number(15,3),            /*投入量                                 */
var05       date,                    /*生效日                                 */
var06       date,                    /*失效日                                 */
var07       number(18,8),            /*产出量                                 */
var08       number(9,4),             /*损耗率                                 */
var09       number(1),               /*取替代属性                             */
var10       number(18,8)             /*替代比率                               */
);

create unique index var_pk on var_file (var01,var02);
alter table var_file add  constraint var_pk primary key  (var01,var02) enable validate;
grant select on var_file to public;
grant index on var_file to public;
grant update on var_file to public;
grant delete on var_file to public;
grant insert on var_file to public;