can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / syaam
select a.sal from emp a
where 2=(select count(distinct b.sal) from emp b
where a.sal<= b.sal)
for getting nth max sal ..replace 2 by n
all the best
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What are pessimistic lock and optimistic lock?
How to create prepared statements using odbc_prepare()?
What is entity data services?
What are the features of Embedded SQL
Explain the different types of joins?
What is page-level compression?
What are the restraints imposed on the table design by a merge replication?
Do you know concepts and capabilities of sql server?
What is the stored procedure?
What do you mean by collation recursive stored procedure?
If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security
How can we determine what objects a user-defined function depends upon?
What is a constant or literal in ms sql server?
Explain about integration services of Microsoft SQL server?
How do you create a data source?