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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_TCTB_JTFASHARE' AND KSQL_INDNAME = 'IDX_TCTB_JTF_NUM') CREATE INDEX IDX_TCTB_JTF_NUM ON T_TCTB_JTFASHARE ( FNUMBER );


 EXEC P_ALTERPK 'PK_TCTB_JTFASHARE_L', 'T_TCTB_JTFASHARE_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_TCTB_JTFASHARE_L' AND KSQL_INDNAME = 'IDX_TCTB_JTFASHARE_L_0') CREATE INDEX IDX_TCTB_JTFASHARE_L_0 ON T_TCTB_JTFASHARE_L ( FID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_TCTB_JTFASHARE_ORGS', 'T_TCTB_JTFASHARE_ORGS', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_TCTB_JTFASHARE_ORGS' AND KSQL_INDNAME = 'IDX_TCTB_JTFASHARE_ORGS_FK') CREATE INDEX IDX_TCTB_JTFASHARE_ORGS_FK ON T_TCTB_JTFASHARE_ORGS ( FID );


 EXEC P_ALTERPK 'PK_TCTB_JTFASHARE_RULES', 'T_TCTB_JTFASHARE_RULES', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_TCTB_JTFASHARE_RULES' AND KSQL_INDNAME = 'IDX_TCTB_JTFASHARE_RULES_FK') CREATE INDEX IDX_TCTB_JTFASHARE_RULES_FK ON T_TCTB_JTFASHARE_RULES ( FID );



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