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

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


 EXEC P_ALTERPK 'PK_TCTB_JSFASHARE_L', 'T_TCTB_JSFASHARE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_JSFASHARE_ORGS', 'T_TCTB_JSFASHARE_ORGS', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_TCTB_JSFASHARE_RULES', 'T_TCTB_JSFASHARE_RULES', 'FENTRYID', '1';

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



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