/*
================================================================================
档案代号:sgx_file
档案名称:工单制程单元变更档
档案目的:工单工艺单元变更单头档
上游档案:
下游档案:
============.========================.==========================================
*/
create table sgx_file
(
sgx01       varchar2(16) DEFAULT '' NOT NULL, /*工单编号*/
sgx02       number(5) DEFAULT '0' NOT NULL, /*制程序号*/
sgx03       number(5) DEFAULT '0' NOT NULL, /*单元变更序号*/
sgx04       varchar2(10),            /*变更原因                               */
sgx05       varchar2(80),            /*变更原因说明                           */
sgx06       date DEFAULT sysdate NOT NULL, /*变更日期*/
sgx07       date,                    /*发放日期                               */
sgx08       varchar2(1) DEFAULT '' NOT NULL, /*审核码*/
sgx09       varchar2(1) DEFAULT '' NOT NULL, /*发放码*/
sgxacti     varchar2(1),             /*资料有效码                             */
sgxdate     date,                    /*最近修改日                             */
sgxgrup     varchar2(10),            /*资料所属群组                           */
sgxmodu     varchar2(10),            /*资料修改者                             */
sgxuser     varchar2(10)             /*资料所有者                             */
);

create unique index sgx_pk on sgx_file (sgx01,sgx02,sgx03);
alter table sgx_file add  constraint sgx_pk primary key  (sgx01,sgx02,sgx03) enable validate;
grant select on sgx_file to public;
grant index on sgx_file to public;
grant update on sgx_file to public;
grant delete on sgx_file to public;
grant insert on sgx_file to public;