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

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

 EXEC P_ALTERPK 'PK_DM_BILLFUNCTION_L', 'T_DM_BILLFUNCTION_L', 'FPKID', '1';

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

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