title: How to write a select between two letters in Oracle database?
body: <p>I am writing a PL/SQL script where I get two letters from the user, let's call them letter1 and letter2. I need to be able select all customers in the database whose names start with the letters between letter1 and letter2 (inclusive). This is what I have so far:</p>
  
  <pre><code>ACCEPT p_fletter PROMPT 'First letter: '
  ACCEPT p_lletter PROMPT 'Last letter: '
  DECLARE
      CURSOR allCusts IS
          SELECT name
            FROM customer
           WHERE name ... -- stuck here
  BEGIN
      -- call the above in some loop
  END;
  /
  </code></pre>
  
  <p>How can I select a value that starts with a letter in the range between p_fletter and p_lletter? I am using Oracle database.</p>