adspace


can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com

Answer Posted / pravin

select max(sal) from emp
where sal=(select max(sal)
from emp
where sal<(select max(sal)
from emp))

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain system functions or built-in functions? What are different types of system functions?

1067


Where can you add custom error messages to sql server?

1215


What is sql server query analyzer?

1131


Does view occupy space?

1022


What is a view in sql?

1043


You have a stored procedure, which execute a lengthy batch job. This stored procedure is called from a trigger you do not want to slow the data entry process you do not want trigger to wait for this batch job to finish before it completes itself what you can do to speed up the process?

1216


How to remove duplicate rows from table except one?

1091


What is a coalesce function?

1285


Disadvantages of the indexes?

1225


How raid can influence database performance?

1119


How do I find the sql server version?

1103


Why we use the openxml clause?

1080


Is it possible to have clustered index on separate drive from original table location?

1041


How to provide default values to function parameters?

1261


Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60

2296