sql satement for 2nd maximum value

Answers were Sorted based on User's Feedback



sql satement for 2nd maximum value ..

Answer / sanjay

select top 1 EmployeeID,min(Rate ) from
(select top 2 EmployeeID ,Rate from
EmployeePay
order by Rate desc)table1 group by EmployeeID ,Rate

Is This Answer Correct ?    0 Yes 0 No

sql satement for 2nd maximum value ..

Answer / manikandan

select distinct top 2 salary from employee order by salary
desc

Is This Answer Correct ?    3 Yes 4 No

sql satement for 2nd maximum value ..

Answer / chandru teamwork

Oredrs is table name orderid is collum name


select top 1 * from Orders
where orderid <=(select max(OrderID) from Orders)

Is This Answer Correct ?    0 Yes 1 No

sql satement for 2nd maximum value ..

Answer / sunil nandedkar

Select min(Salary)ThirdHighest from employees where salary
in (Select top 3 salary from employees order by salary desc)
For nth replace top 3 with top n

Is This Answer Correct ?    3 Yes 5 No

sql satement for 2nd maximum value ..

Answer / rohan patil

Select * from author where rownum=2
order by ID desc

Is This Answer Correct ?    5 Yes 20 No

Post New Answer

More VB.NET Interview Questions

Explain about visual basic?

0 Answers  


What is the Common Language Runtime?

10 Answers   Ksb,


I want to reduce my CPU Usage when I am querying the Database for records. Now my Winform App(in VB.Net) suddenly Jumps to 100% CPU Usage when i query for records from sql server database. I want this Usage to be less. Any help is appreciated

2 Answers  


What is non_deterministic finalization?

0 Answers  


i have two class that contain's two methods as same name in derived class i have to call these two methods what will happen at run time ?

0 Answers   IBM,






Explain about the ruby interface generator?

0 Answers  


How to execute VB.NET PROJECTS,VB6.0 PROJECTS AND write their test cases.Need Reply Urgently

0 Answers  


What is tracing?

0 Answers  


Is VB.NET object oriented? What are the inheritances does VB.NET support ?

13 Answers   Digital GlobalSoft, Global Infotech, Infosys,


What is the difference between readonly variable and constant variable?

0 Answers  


What is internal keyword in .net framework?

0 Answers  


Why do we use byref keyword in vb.net?

0 Answers  


Categories