/*
================================================================================
档案代号:qao_file
档案名称:QC单据备注档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table qao_file
(
qao01       varchar2(16) NOT NULL,   /*单据单号                               */
qao02       number(5) NOT NULL,      /*收货项次                               */
                                     /*收货项次#FQC.PQC 为 0                  */
qao021      number(5) NOT NULL,      /*检验批号                               */
                                     /*检验批号(分批检验顺序)    #FQC.PQC为 0 */
qao03       number(5) NOT NULL,      /*项次                                   */
                                     /*项次 (0 表示整张备注,123...表示单身备注)*/
qao04       number(5) NOT NULL,      /*行序                                   */
qao05       varchar2(1) NOT NULL,    /*列印码                                 */
                                     /*列印码(1.列印于前 2.列印于后 0.内部参考)*/
qao06       varchar2(255)            /*备注                                   */
                                     /*备注 (单身备注且列印于后, 限制char(30))*/
);

create unique index qao_pk on qao_file (qao01,qao02,qao021,qao03,qao04,qao05);
alter table qao_file add  constraint qao_pk primary key  (qao01,qao02,qao021,qao03,qao04,qao05) enable 
validate;
grant select on qao_file to public;
grant index on qao_file to public;
grant update on qao_file to public;
grant delete on qao_file to public;
grant insert on qao_file to public;