/*
================================================================================
档案代号:foo_file
档案名称:固定资产系统科目余额档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table foo_file
(
foo01       varchar2(24) NOT NULL,   /*科目编号                               */
foo02       varchar2(10) NOT NULL,   /*部门                                   */
foo03       number(5) NOT NULL,      /*年度                                   */
foo04       number(5) NOT NULL,      /*期别                                   */
                                     /*期别 (0:年初余额 1/2/3..:各期余额)     */
foo05d      number(20,6) NOT NULL,   /*本币借方金额                           */
foo06c      number(20,6) NOT NULL,   /*本币贷方金额                           */
foo07       varchar2(10) NOT NULL,   /*营运中心别                             */
foo08       varchar2(5) NOT NULL     /*帐别                                   */
);

create unique index foo_pk on foo_file (foo07,foo08,foo01,foo02,foo03,foo04);
alter table foo_file add  constraint foo_pk primary key  (foo07,foo08,foo01,foo02,foo03,foo04) enable 
validate;
grant select on foo_file to public;
grant index on foo_file to public;
grant update on foo_file to public;
grant delete on foo_file to public;
grant insert on foo_file to public;