title: SQL select top rows based on limit
body: <p>Please help me t make below select query </p>
  
  <p>Source table</p>
  
  <pre><code>name Amount  
   -----------
   A   2    
   B   3    
   C   2
   D   7
  </code></pre>
  
  <p>if limit is 5 then result table should be    </p>
  
  <pre><code>name Amount  
   -----------
   A   2    
   B   3   
  </code></pre>
  
  <p>if limit is 8 then result table</p>
  
  <pre><code>name Amount  
   -----------
   A   2    
   B   3    
   C   2
  </code></pre>