/*
================================================================================
档案代号:aao_file
档案名称:部门科目余额档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table aao_file
(
aao00       varchar2(5) NOT NULL,    /*帐别                                   */
aao01       varchar2(24) NOT NULL,   /*科目编号                               */
                                     /*科目编号  Course No                    */
aao02       varchar2(10) NOT NULL,   /*部门编号                               */
                                     /*部门  Cost Center                      */
aao03       number(5) NOT NULL,      /*会计年度                               */
aao04       number(5) NOT NULL,      /*期别                                   */
aao05       number(20,6),            /*借方余额                               */
aao06       number(20,6),            /*贷方余额                               */
aao07       number(15,3),            /*借方笔数                               */
aao08       number(15,3)             /*贷方笔数                               */
);

create unique index aao_pk on aao_file (aao01,aao02,aao03,aao04,aao00);
alter table aao_file add  constraint aao_pk primary key  (aao01,aao02,aao03,aao04,aao00) enable validate;
grant select on aao_file to public;
grant index on aao_file to public;
grant update on aao_file to public;
grant delete on aao_file to public;
grant insert on aao_file to public;