Delete Rate Plan

  • Database Login

    Replace ‘USERNAME’ with your username, ‘PASSWORD’ with your password, and ‘DATABASE’ with your database name.

    • MySQL

      mysql -u USERNAME -p PASSWORD -D DATABASE
      
    • Oracle

      sqlplus USERNAME/PASSWORD@DATABASE
      
  • SQL statements

    In the following examples, rate plans are being deleted for the account “XYZ”.

    • Delete All Rate Plans for an Account

      • MySQL
      delete from RATEPLAN where CUSTOMERNAME = 'XYZ';
      commit;
      
      • Oracle
      delete from RATEPLAN where CUSTOMERNAME = 'XYZ';
      commit;
      
    • Delete Rate Plans by Account and Rate Plan ID

      • MySQL
      delete from RATEPLAN where CUSTOMERNAME = 'XYZ' AND ID < 54;
      commit;
      
      • Oracle
      delete from RATEPLAN where CUSTOMERNAME = 'XYZ' AND ID < 128;
      commit;
      
    • Delete Rate Plans by Account and Effective Date

      • MySQL
      delete from RATEPLAN where CUSTOMERNAME='XYZ' and EFFECTIVEDATE <' 2014-12-01';
      commit;
      
      • Oracle
      delete from RATEPLAN where CUSTOMERNAME='XYZ' and EFFECTIVEDATE < TO_TIMESTAMP('2014-12-01','YYYY-MM-DD');
      commit;
      
    • Delete Rate Plan by Rate Plan ID

      • MySQL
      delete from RATEPLAN where ID = xxx;
      commit;
      
      • Oracle
      delete from RATEPLAN where ID = xxx;
      commit;
      

      Delete-By-ID

    • Delete All Rate Plans in the Database

      • MySQL
      delete from RATEPLAN;
      commit;
      
      • Oracle
      delete from RATEPLAN;
      commit;