/*
================================================================================
档案代号:ztd_file
档案名称:Constraint 单身档
档案目的:
上游档案:
下游档案:
============.========================.==========================================
*/
create table ztd_file
(
ztd01       varchar2(30) NOT NULL,   /*档案代码                               */
ztd02       varchar2(80) NOT NULL,   /*资料库名称                             */
ztd03       varchar2(30) NOT NULL,   /*Constraint 名称                        */
ztd04       varchar2(1),             /*Constraint 型态                        */
ztd05       varchar2(255),           /*search condition                       */
ztd06       varchar2(30),            /*referenced schema                      */
ztd07       varchar2(30),            /*referenced constraint name             */
ztd08       varchar2(1),             /*delete rule                            */
ztd09       varchar2(1),             /*status                                 */
ztd10       varchar2(1),             /*deferrable                             */
ztd11       varchar2(1),             /*validated                              */
ztd12       varchar2(1),             /*attribute                              */
ztd13       varchar2(255),           /*Primary Key 栏位                       */
ztd14       varchar2(255),           /*primarykey position                    */
ztd15       varchar2(255),           /*referenced 栏位                        */
ztd16       varchar2(255),           /*referenced position                    */
ztd17       varchar2(30)             /*referenced table                       */
);

create unique index ztd_pk on ztd_file (ztd01,ztd02,ztd03);
alter table ztd_file add  constraint ztd_pk primary key  (ztd01,ztd02,ztd03) enable validate;
grant select on ztd_file to public;
grant index on ztd_file to public;
grant update on ztd_file to public;
grant delete on ztd_file to public;
grant insert on ztd_file to public;