title: how to get limited number of rows from combination of 2 queries
body: <p>Iam facing some logical issues.Hope that someone can find me a solution to it</p>
  
  <p>Iam having a query</p>
  
  <pre><code>select FirstName||'|'||LastName||to_char(salary) 
  from (select FirstName,LastName,salary from subs_tbl where salary=24000) 
  union all select FirstName||'|'||''||to_char(salary) 
  from (select FirstName,LastName,salary from subs_tbl where salary=30000)
  </code></pre>
  
  <p>so my result will be</p>
  
  <pre><code>Satish|Kumar|24000
  
  Vimal|Kumar|24000
  
  Dinesh||30000
  </code></pre>
  
  <p>Let say am having 3 rows as my result but i need to add another condition to the whole query that i need only 2 rows out of the combination of these queries.</p>
  
  <p>Please help me with this</p>