title: How to get Active status based on status field in sql?
body: <blockquote>
    <p>Suppose there is active and inactive state in 2 rows </p>
  </blockquote>
  
  <pre><code>select * from table name where status in (Active,Inactive);
  </code></pre>
  
  <blockquote>
    <p>If active status is there need to consider that as 1st priority else need to get Inactive state</p>
  </blockquote>
  
  <p>Could any one suggest some solution</p>
  
  <pre><code>    SCH_NAME,   STATE,  VER
  </code></pre>
  
  <p>1   pk  Planned 2<br>
  2   pk  Active 1    </p>