adspace


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

Answer Posted / tulasi ravi kumar

hi,
my id is ravi106109@gmail.com

select sal from emp a
where 1=(select count(b.sal) from emp b
where a.sal<b.sal) order by sal desc;

and also dileep is write

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the primary use of the model database?

1147


What are wait types?

1248


What are the properties of the transaction?

1072


Can you index views?

953


What is temporary table in sql server? Why we use temp table?

1019


Does view occupy space?

1018


When should you use an instead of trigger?

1051


How do I find query history in sql server?

1022


What is acid mean in sql server?

1244


What is a view in sql?

1039


List out the different types of locks available in sql server?

1049


what is the difference between openrowset and openquery?

1193


What is a coalesce function?

1282


How can I check that whether automatic statistic update is enabled or not?

1111


How do I start sql server 2017?

1015