/*
================================================================================
档案代号:ocm_file
档案名称:产品替代群组资料档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table ocm_file
(
ocm01       char(4) NOT NULL,        /*替代群组                               */
ocm02       char(40) NOT NULL,       /*产品编号                               */
ocm03       date NOT NULL,           /*生效日期                               */
ocm04       date,                    /*失效日期                               */
ocm05       varchar2(10) NOT NULL,   /*客户编号                               */
ocm06       number(5)                /*替代顺序                               */
);

create unique index ocm_pk on ocm_file (ocm01,ocm02,ocm03,ocm05);
alter table ocm_file add  constraint ocm_pk primary key  (ocm01,ocm02,ocm03,ocm05) enable validate;
grant select on ocm_file to public;
grant index on ocm_file to public;
grant update on ocm_file to public;
grant delete on ocm_file to public;
grant insert on ocm_file to public;