/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MDL_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_MAST_STATISTICS', 'T_MAST_STATISTICS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MAST_STATISTICS_BIZAPPID') CREATE INDEX IDX_MAST_STATISTICS_BIZAPPID ON T_MAST_STATISTICS ( FBIZAPPID );

 EXEC P_ALTERPK 'PK_T_MAST_STATISTICS_L', 'T_MAST_STATISTICS_L', 'FPKID', '1';

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

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