title: How to order the column value in sql?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10999913/why-do-results-from-a-sql-query-not-come-back-in-the-order-i-expect">Why do results from a SQL query not come back in the order I expect?</a>  </p>
  </blockquote>
  
  
  
  <p>I have table like this..My table name  is pattern.</p>
  
  <pre><code>S.No      type      Id_Section
      1          A        IPS
      2          A        IPS
      3          A        IPS
      4          A        IPS
      1          B        IPS
      2          B        IPS
      3          B        IPS
      1          C        IPS
      2          C        IPS
      5          A        IPS
      4          B        IPS
  </code></pre>
  
  <p>In this table, last row has unordered.So
  I need to order table where serialno, and type = 'A'
   ..
  After ordering,
  For example I should display like this</p>
  
  <pre><code>S.No      type      Id_Section
      1          A        IPS
      2          A        IPS
      3          A        IPS
      4          A        IPS
      5          A        IPS
      1          B        IPS
      2          B        IPS
      3          B        IPS
      4          B        IPS
      1          C        IPS
      2          C        IPS
  </code></pre>
  
  <p>How to write a sql query for this?Please anyone help me</p>