/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\TCTB_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_TCTB_ORG_GROUP_L', 'T_TCTB_ORG_GROUP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_TCTB_ORG_GROUP_DETAIL', 'T_TCTB_ORG_GROUP_DETAIL', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_TCTB_ORG_GROUP', 'T_TCTB_ORG_GROUP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCTB_ORG_GROUP') CREATE INDEX IDX_T_TCTB_ORG_GROUP ON T_TCTB_ORG_GROUP ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_TCTB_ORG', 'T_TCTB_ORG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TCTB_ORG_FNUMBER') CREATE INDEX IDX_T_TCTB_ORG_FNUMBER ON T_TCTB_ORG ( FNUMBER );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\TCTB_constraint.sql **/
