write a query to Find the Maximun second value in table?

Answers were Sorted based on User's Feedback



write a query to Find the Maximun second value in table?..

Answer / ruchi

you can use following query
select max(sal) from emp where sal<(select max(sal) from
emp);

Is This Answer Correct ?    3 Yes 1 No

write a query to Find the Maximun second value in table?..

Answer / tulasi

select * from emp x where 2=(select count(distinct sal)
from emp y where x.sal<=y.sal);

Is This Answer Correct ?    3 Yes 1 No

write a query to Find the Maximun second value in table?..

Answer / kd

select sal
from
(selec sal, row_number () over (order by sal desc nulls
last) as rnk
where rnk = 2;

Is This Answer Correct ?    0 Yes 0 No

write a query to Find the Maximun second value in table?..

Answer / smriti

select salary from(select rownum r,salary from details
order by salary desc)where rownum<2 and salary<(select max
(Salary) from details)

Is This Answer Correct ?    0 Yes 1 No

write a query to Find the Maximun second value in table?..

Answer / kavita

select max(sal) from emp where sal not in (select max(sal)
from emp)

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More Database Management Interview Questions

What are the characteristics of database?

0 Answers  


What are the types of Calculated columns available ?

1 Answers  


Mention a query to add email validation to your database

0 Answers  


How many database systems are there?

0 Answers  


What do you mean by index hunting?

0 Answers  






What do you mean by denormalization?

0 Answers  


Explain the concept of acid properties in dbms?

0 Answers  


What is cardinality in db?

0 Answers  


What is stored in a database?

0 Answers  


Which is the best free database software?

0 Answers  


What types of questions are asked in NIC(Natinal Informatics Centre)'s interview?If any one has any information about this,I would be very thankful to him/her.....

0 Answers   NIC,


Is facebook a database?

0 Answers  


Categories