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 |
can you write commit in triggers?
Give the various exception types.
Can a parameter be passed to a cursor?
How to transfer database(500 gb) of oracle enterprise edition to standard edition downtime is only 1 hour not using exp/imp option ?
What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is involved in tuning it?
What is set operator oracle?
What is a synonym? What are its various types?
State the difference between a primary key and foreign key?
Whether any commands are used for months calculation? If so, what are they?
How to call a stored function with parameters?
When can Hash Cluster used ?
how to i write the query 'NISHI' TO N I S H I
4 Answers Attra, Metric Stream,