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

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


 EXEC P_ALTERPK 'PK_TCCIT_INVEST_PROFIT_SUM', 'T_TCCIT_INVEST_PROFIT_SUM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_HHQYHHR_SUMMARY', 'T_TCCIT_HHQYHHR_SUMMARY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_HHQYHHR_TZ_DETAIL', 'T_TCCIT_HHQYHHR_TZ_DETAIL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_TZZCCSCBTZ_DETAIL', 'T_TCCIT_TZZCCSCBTZ_DETAIL', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_TZZCCSCBTZ_SUM', 'T_TCCIT_TZZCCSCBTZ_SUM', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_INTEREST_SUMMARY', 'T_TCCIT_INTEREST_SUMMARY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_INTEREST_TZ_DET', 'T_TCCIT_INTEREST_TZ_DET', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_GYJZBDSY_SUMMARY', 'T_TCCIT_GYJZBDSY_SUMMARY', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_TCCIT_GYJZBDSY_TZ_DET', 'T_TCCIT_GYJZBDSY_TZ_DET', 'FID', '1';

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



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