/*
================================================================================
档案代号:tah_file
档案名称:会计科目币别各期余额档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table tah_file
(
tah00       varchar2(5) NOT NULL,    /*帐别编号                               */
tah01       varchar2(24) NOT NULL,   /*科目编号                               */
tah02       number(5) NOT NULL,      /*会计年度                               */
tah03       number(5) NOT NULL,      /*期别                                   */
tah04       number(20,6) NOT NULL,   /*借方金额                               */
tah05       number(20,6) NOT NULL,   /*贷方金额                               */
tah06       number(10),              /*借方笔数                               */
tah07       number(10),              /*贷方笔数                               */
tah08       varchar2(4) NOT NULL,    /*币别                                   */
tah09       number(20,6),            /*原币借方金额                           */
tah10       number(20,6)             /*原币贷方金额                           */
);

create unique index tah_pk on tah_file (tah01,tah02,tah03,tah08,tah00);
alter table tah_file add  constraint tah_pk primary key  (tah01,tah02,tah03,tah08,tah00) enable validate;
grant select on tah_file to public;
grant index on tah_file to public;
grant update on tah_file to public;
grant delete on tah_file to public;
grant insert on tah_file to public;