/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\FMM_constraint.sql **/
 EXEC P_ALTERPK 'PK_FMM_DEFECTDEF', 'T_FMM_DEFECTDEF', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_FMM_DEFECTDEF_L', 'T_FMM_DEFECTDEF_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FMM_DEFECTDEF_L') CREATE INDEX IDX_FMM_DEFECTDEF_L ON T_FMM_DEFECTDEF_L ( FID ,FLOCALEID );



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