sql satement for 2nd maximum value
Answers were Sorted based on User's Feedback
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 |
Answer / manikandan
select distinct top 2 salary from employee order by salary
desc
| Is This Answer Correct ? | 3 Yes | 4 No |
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 |
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 |
Answer / rohan patil
Select * from author where rownum=2
order by ID desc
| Is This Answer Correct ? | 5 Yes | 20 No |
What is the main use of a namespace?
What are the difference between structure and class?
how to get dynamic control array position or its index position?
Explain option strict?
what are the advantage in vb.net and different between vb and vb.net
6 Answers Data Entry Operator, Infosys, TCS, Zansa,
What are all the parts of .net framework?
What is the role of new keyword?
What is code access security?
Write a program to find all text files in a logical drive and return the count of the number of files?
Can we use a crystal report into a another crystal report
What is an abstract class?
Explain about the performance of visual basic?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)