title: How to sort the table of number in PL/SQL?
body: <p>I want to display the numbers in ascending order by using collections in plsql.</p>
  
  <p>I have code like below. It will display the numbers in unsorted order, but I want to display them in sorted order </p>
  
  <pre><code>DECLARE
      TYPE num_asc IS
          TABLE OF NUMBER;
      rec_num   num_asc;
      v_var     NUMBER;
  BEGIN
      rec_num := num_asc(10,21,13,14,52,16);
      FOR i IN rec_num.first..rec_num.last LOOP
          dbms_output.put_line (rec_num (i));
      END LOOP;
  END;
  </code></pre>
  
  <blockquote>
  <pre><code>Required result:  
  10  
  13  
  14  
  16  
  21  
  52
  </code></pre>
  </blockquote>