/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\TCTB_constraint.sql **/
 EXEC P_ALTERPK 'PK_TCTB_TAX_VER_NORMAL', 'T_TCTB_TAX_VER_NORMAL', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCTB_TAX_VER_NORMAL') CREATE INDEX IDX_TCTB_TAX_VER_NORMAL ON T_TCTB_TAX_VER_NORMAL ( FORG );


 EXEC P_ALTERPK 'PK_TCTB_TAX_VER_NORMAL_E', 'T_TCTB_TAX_VER_NORMAL_E', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_TAX_VER_XFS', 'T_TCTB_TAX_VER_XFS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCTB_TAX_VER_XFS') CREATE INDEX IDX_TCTB_TAX_VER_XFS ON T_TCTB_TAX_VER_XFS ( FORG );


 EXEC P_ALTERPK 'PK_TCTB_TAX_VER_XFS_E', 'T_TCTB_TAX_VER_XFS_E', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_TAX_VER_YHS', 'T_TCTB_TAX_VER_YHS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCTB_TAX_VER_YHS') CREATE INDEX IDX_TCTB_TAX_VER_YHS ON T_TCTB_TAX_VER_YHS ( FORG );


 EXEC P_ALTERPK 'PK_TCTB_TAX_VER_YHS_E', 'T_TCTB_TAX_VER_YHS_E', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_TAXINFO_POINT_VER', 'T_TCTB_TAXINFO_POINT_VER', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_TCTB_TAXINFO_POINT_VER_FK') CREATE INDEX IDX_TCTB_TAXINFO_POINT_VER_FK ON T_TCTB_TAXINFO_POINT_VER ( FENTRYID );



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