.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

Tippical Interview Querries

Posted By: venu     Posted Date: July 04, 2011    Points:5   Category :Sql Server
HI Friends!

Can any one give me the tippical interview querries like find the 3rd employee salary with out using top et..c

Thanks & Regards

Author: Gowthammanju             
Posted Date: July 05, 2011     Points: 20   

hey try these as

SELECT min(sal) FROM (SELECT sal FROM emp WHERE sal IS NOT NULL ORDER BY sal DESC) WHERE rownum<=&rownum

Thanks & Regards,

Mark if the answer is true
Author: Dhiraj Ranka             
Posted Date: July 05, 2011     Points: 20   


Try this

select * from employee emp where
3=(select count(distinct salary) from employee where emp.salary<=salary);

Hope this helps

Hope this helps.

Thanks & Regards,
Dhiraj Ranka
http://www.twitter.com/dhirajranka | http://www.dhirajranka.com

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend