/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_constraint.sql **/
 EXEC P_ALTERPK 'PK_TCCIT_A301010201_DEVE', 'T_TCCIT_A301010201_DEVE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_A301010201_DEVE') CREATE INDEX IDX_TCCIT_A301010201_DEVE ON T_TCCIT_A301010201_DEVE ( FORGID ,FSKSSQQ ,FSKSSQZ ,FDEVELOPTYPE );


 EXEC P_ALTERPK 'PK_TCCIT_A301010201_INCOME', 'T_TCCIT_A301010201_INCOME', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_A301010201_INCOME') CREATE INDEX IDX_TCCIT_A301010201_INCOME ON T_TCCIT_A301010201_INCOME ( FORGID ,FSKSSQQ ,FSKSSQZ ,FINCOMETYPE );


 EXEC P_ALTERPK 'PK_TCCIT_A301010201_LEVEL', 'T_TCCIT_A301010201_LEVEL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_A301010201_LEVEL') CREATE INDEX IDX_TCCIT_A301010201_LEVEL ON T_TCCIT_A301010201_LEVEL ( FORGID ,FSKSSQQ ,FSKSSQZ ,FLEVELTYPE );


 EXEC P_ALTERPK 'PK_TCCIT_A301010201_PEOPLE', 'T_TCCIT_A301010201_PEOPLE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_A301010201_PEOPLE') CREATE INDEX IDX_TCCIT_A301010201_PEOPLE ON T_TCCIT_A301010201_PEOPLE ( FORGID ,FSKSSQZ ,FSKSSQQ ,FPEOPLETYPE );


 EXEC P_ALTERPK 'PK_TCCIT_DG_A301010200_SUM', 'T_TCCIT_DG_A301010200_SUM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DG_A301010200_SUM') CREATE INDEX IDX_TCCIT_DG_A301010200_SUM ON T_TCCIT_DG_A301010200_SUM ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_POLICY_SHAREHOLD', 'T_TCCIT_POLICY_SHAREHOLD', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_POLICY_SHAREHOLD_FK') CREATE INDEX IDX_TCCIT_POLICY_SHAREHOLD_FK ON T_TCCIT_POLICY_SHAREHOLD ( FID );


 EXEC P_ALTERPK 'PK_TCCIT_SPEC_DKSS_TZ_DETA', 'T_TCCIT_SPEC_DKSS_TZ_DETA', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_SPEC_DKSS_TZ_DETA') CREATE INDEX IDX_TCCIT_SPEC_DKSS_TZ_DETA ON T_TCCIT_SPEC_DKSS_TZ_DETA ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_DKSSZBJ_SUMMARY', 'T_TCCIT_DKSSZBJ_SUMMARY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DKSSZBJ_SUMMARY') CREATE INDEX IDX_TCCIT_DKSSZBJ_SUMMARY ON T_TCCIT_DKSSZBJ_SUMMARY ( FEWBLXH ,FSBBID );


 EXEC P_ALTERPK 'PK_TCCIT_DG_A100000_1_DET', 'T_TCCIT_DG_A100000_1_DET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DG_A100000_1_DET') CREATE INDEX IDX_TCCIT_DG_A100000_1_DET ON T_TCCIT_DG_A100000_1_DET ( FORGID ,FSKSSQQ ,FSKSSQZ ,FRULEID ,FITEMNUMBER );


 EXEC P_ALTERPK 'PK_TCCIT_DG_A100000_1_SUM', 'T_TCCIT_DG_A100000_1_SUM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DG_A100000_1_SUM') CREATE INDEX IDX_TCCIT_DG_A100000_1_SUM ON T_TCCIT_DG_A100000_1_SUM ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_DG_A101020_DET', 'T_TCCIT_DG_A101020_DET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DG_A101020_DET') CREATE INDEX IDX_TCCIT_DG_A101020_DET ON T_TCCIT_DG_A101020_DET ( FORGID ,FSKSSQQ ,FSKSSQZ ,FRULEID ,FITEMNUMBER );


 EXEC P_ALTERPK 'PK_TCCIT_DG_A101020_SUM', 'T_TCCIT_DG_A101020_SUM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DG_A101020_SUM') CREATE INDEX IDX_TCCIT_DG_A101020_SUM ON T_TCCIT_DG_A101020_SUM ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_DG_A102020_DET', 'T_TCCIT_DG_A102020_DET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DG_A102020_DET') CREATE INDEX IDX_TCCIT_DG_A102020_DET ON T_TCCIT_DG_A102020_DET ( FORGID ,FSKSSQQ ,FSKSSQZ ,FRULEID ,FITEMNUMBER );


 EXEC P_ALTERPK 'PK_TCCIT_DG_A102020_SUM', 'T_TCCIT_DG_A102020_SUM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DG_A102020_SUM') CREATE INDEX IDX_TCCIT_DG_A102020_SUM ON T_TCCIT_DG_A102020_SUM ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_DG_A103000_DET', 'T_TCCIT_DG_A103000_DET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DG_A103000_DET') CREATE INDEX IDX_TCCIT_DG_A103000_DET ON T_TCCIT_DG_A103000_DET ( FORGID ,FSKSSQQ ,FSKSSQZ ,FRULEID ,FITEMNUMBER );


 EXEC P_ALTERPK 'PK_TCCIT_DG_A103000_SUM', 'T_TCCIT_DG_A103000_SUM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_DG_A103000_SUM') CREATE INDEX IDX_TCCIT_DG_A103000_SUM ON T_TCCIT_DG_A103000_SUM ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_QYCZJDYNS_SUM', 'T_TCCIT_QYCZJDYNS_SUM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_QYCZJDYNS_SUM') CREATE INDEX IDX_TCCIT_QYCZJDYNS_SUM ON T_TCCIT_QYCZJDYNS_SUM ( FORGID ,FSKSSQQ ,FSKSSQZ );


 EXEC P_ALTERPK 'PK_TCCIT_QYCZJDYNS_TZ_DET', 'T_TCCIT_QYCZJDYNS_TZ_DET', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCCIT_QYCZJDYNS_TZ_DET') CREATE INDEX IDX_TCCIT_QYCZJDYNS_TZ_DET ON T_TCCIT_QYCZJDYNS_TZ_DET ( FORGID ,FSKSSQQ ,FSKSSQZ ,FRULEID ,FITEMNUMBER );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCCIT_constraint.sql **/
