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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BOTP_TABLEUSERECORD' AND KSQL_INDNAME = 'IDX_BOTP_TABLEUSERECORD_NUM') CREATE INDEX IDX_BOTP_TABLEUSERECORD_NUM ON T_BOTP_TABLEUSERECORD ( FENTITYNUMBER );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BOTP_TABLEUSERECORD' AND KSQL_INDNAME = 'IDX_BOTP_TABLEUSERECORD_ID') CREATE INDEX IDX_BOTP_TABLEUSERECORD_ID ON T_BOTP_TABLEUSERECORD ( FTABLEID );

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