mercredi 27 janvier 2016

3rd highest salary using TOP

SELECT TOP 1 salary FROM (    
   SELECT TOP 3 salary     
   FROM employees     
   ORDER BY salary DESC) AS emp  
ORDER BY salary ASC

why is AS emp used in the query?? query does not work without using AS

Aucun commentaire:

Enregistrer un commentaire