/**Begin C:\anzhuang\PDM_UPGRADE\PDM1\BASTAX_constraint.sql **/
 EXEC P_ALTERPK 'PK_BD_MINIMUMTAX', 'T_BD_MINIMUMTAX', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_MINIMUMTAX_ORG') CREATE INDEX IDX_T_BD_MINIMUMTAX_ORG ON T_BD_MINIMUMTAX ( FUSEORG ,FTAXAREA );


 EXEC P_ALTERPK 'PK_BD_MINIMUMTAX_ENTRY', 'T_BD_MINIMUMTAX_ENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_BD_MINIMUMTAX_L', 'T_BD_MINIMUMTAX_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_BD_TAXRATE_ENTRY', 'T_BD_TAXRATE_ENTRY', 'FENTRYID', '1';

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



/**End C:\anzhuang\PDM_UPGRADE\PDM1\BASTAX_constraint.sql **/
