/**Begin D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_constraint.sql **/
 EXEC P_ALTERPK 'PK_SIM_MATCH_BILL', 'T_SIM_MATCH_BILL', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_MATCH_BILL_FBILLNO') CREATE  CLUSTERED INDEX IDX_SIM_MATCH_BILL_FBILLNO ON T_SIM_MATCH_BILL ( FBILLNO );


 EXEC P_ALTERPK 'PK_SIM_MATCH_BILL_ITEM', 'T_SIM_MATCH_BILL_ITEM', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_MATCH_BILL_ITEM_FK') CREATE  CLUSTERED INDEX IDX_SIM_MATCH_BILL_ITEM_FK ON T_SIM_MATCH_BILL_ITEM ( FID );


 EXEC P_ALTERPK 'PK_SIM_MATCH_BILL_ORIITEM', 'T_SIM_MATCH_BILL_ORIITEM', 'FDETAILID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_MATCH_BILL_ORIITEM_FK') CREATE  CLUSTERED INDEX IDX_SIM_MATCH_BILL_ORIITEM_FK ON T_SIM_MATCH_BILL_ORIITEM ( FENTRYID );


 EXEC P_ALTERPK 'PK_SIM_MATCHBILL_RELATION', 'T_SIM_MATCHBILL_RELATION', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_MATCHBILL_RELATION_SID') CREATE  CLUSTERED INDEX IDX_SIM_MATCHBILL_RELATION_SID ON T_SIM_MATCHBILL_RELATION ( FSBILLID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_SIM_MATCHBILL_RELATION_TID') CREATE INDEX IDX_SIM_MATCHBILL_RELATION_TID ON T_SIM_MATCHBILL_RELATION ( FTBILLID );



/**End D:\pdm\PDM_UPGRADE_1.1\PDM_UPGRADE\pdm1\SIM_constraint.sql **/
