title: SQL, select Nth to Mth record from a table, which query is more efficient?
body: <p>An interview question:</p>
  
  <p>write SQL Server query to return 30th to 40th record of a table A</p>
  
  <p>my answer:</p>
  
  <pre><code>select top 10 * from (select top 40 * from tb desc) asc
  
  select top 40 * from A where id not in(select top 30 id from A) 
  </code></pre>
  
  <p>which of above 2 is more efficient? why?</p>