title: The use of double vertical bars in pl/sql
body: <p>I want to find the reverse string program. There are many examples I have found but none explain what happens exactly inside the for loop:</p>
  
  <pre><code>DECLARE
  ln_rev_input varchar2(50);
  ln_input varchar2(50):= '&amp;input';
  
  BEGIN
       FOR i in reverse 1..length(ln_input) LOOP
           ln_rev_input := ln_rev_input||substr(ln_input, i, 1);
       END LOOP;
       dbms_output.put_line(ln_rev_input);
  END;
  </code></pre>
  
  <p>I don't understand this line, especially the use of '||' in this program:</p>
  
  <pre><code>ln_rev_input := ln_rev_input||substr(ln_input, i, 1);
  </code></pre>
  
  <p>I know this '||' is used to concatenate strings but don't understand how exactly ln_rev_input is being assigned.</p>
  
  <p>Thanks</p>