/*
================================================================================
档案代号:aef_file
档案名称:专案余额档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table aef_file
(
aef00       varchar2(5) NOT NULL,    /*帐别                                   */
aef01       varchar2(24) NOT NULL,   /*科目编号                               */
                                     /*科目编号 (明细或独立科目)              */
aef02       varchar2(10) NOT NULL,   /*专案编号                               */
aef03       number(5) NOT NULL,      /*会计年度                               */
aef04       number(5) NOT NULL,      /*期别                                   */
aef05       number(20,6),            /*借方总金额                             */
aef06       number(20,6),            /*贷方总金额                             */
aef07       number(5),               /*贷方总笔数                             */
aef08       number(5)                /*贷方总笔数                             */
);

create unique index aef_pk on aef_file (aef01,aef02,aef03,aef04,aef00);
alter table aef_file add  constraint aef_pk primary key  (aef01,aef02,aef03,aef04,aef00) enable validate;
grant select on aef_file to public;
grant index on aef_file to public;
grant update on aef_file to public;
grant delete on aef_file to public;
grant insert on aef_file to public;