how to find out second largest value in the table
Answers were Sorted based on User's Feedback
Answer / irshad ahmad
Select max(price) from product where price
not in (select max(price) from product);
| Is This Answer Correct ? | 15 Yes | 3 No |
Answer / sandeep
select * from (select ename,sal,rank() over(order by sal desc) as ranks from emp)
where ranks=2;
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / karthik
select distinct sal from emp a where 2 = (select count
(distinct sal) from emp b where a.sal <= b.sal)
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / mk
select *from emp where sal=(select distinct(max(sal)) from
emp where sal <select max(sal) from emp )
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sudhakara reddy k
select max(sal) from emp where
sal<(select max(sal) from emp);
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / kamala k n
select * from (select ename,sal,rank() over(order by sal desc) as ranks from emp)
where ranks=2;
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vishal
select * from (
select * from test where sal < (select max(sal) from test)
order by 2 desc)
where rownum =1
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / anandh
select * from emp where sal = (select max(sal) from emp where sal<>(select max(sal) from emp));
| Is This Answer Correct ? | 0 Yes | 1 No |
How to display First 4 rows From Database Table?
An automatic job running via DBMS_JOB has failedKnowing only that its failed, how do you approach troubleshooting this issue?
Shall I get Pro*C Compiler in Oracle-10g release ?
I'm doing my final year and i ve planned to do an oracle certification , is this the rit tim nd wat's the future scope??
What is the use of aggregate functions in oracle?
What do you know about normalization? Explain in detail?
What WHERE CURRENT OF clause does in a cursor?
Where do we use decode and case statements?
Explain the use of indexes option in imp command.
what is the uses of cusor
What are the differences between a sys and system user and what are the extra privileges available to the sys user?
what is the exact diiference between DBMS and RDBMS