title: How to convert rows to columns in Oracle SQL
body: <p>For a requirement I have to create a query to show Employees Schedule per week. Query is like this:</p>
  
  <pre><code>select weekday, sched_hrs
    from table
   where emplid = '12345'
     and weekday_name= 1
  </code></pre>
  
  <p>Output of this query is like:</p>
  
  <pre><code>Weekday |  Sched_hrs
  -------------------- 
     1    |    7.6
     1    |    7.6
     1    |    7.6
     1    |    7.6
     1    |    7.6
     1    |    OFF
     1    |    OFF
  </code></pre>
  
  <p>I want the output in below format:</p>
  
  <pre><code>1   7.6  7.6   7.6   7.6   7.6   OFF  OFF
  </code></pre>
  
  <p>How to achieve it?</p>