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

What is the difference between Abstract Classes and Interfaces? Give the answer as a table format....

5 Answers  


How to connect a service based database to vb.net forms? Do we have to create any specific database?

1 Answers  


What is MSIL

8 Answers  


Which control is an example of an object in vb net?

0 Answers  


What’s the difference between private and shared assembly?

0 Answers  






is ADO.NET important to connect sql server? is any other way to connect sql server?

1 Answers  


What is enumerator?

0 Answers  


What are the different types of a stream?

0 Answers  


What is the feature which is common to all .net languages?

0 Answers  


Name the class which allows an element to be accessed using unique key?

0 Answers  


1.wht is satellite assembly??? 2.How Garbage Collector works can u explain ????

3 Answers   ABC,


Explain the services provided by common language infrastructure.

0 Answers  


Categories