how to find the second highest salary from emp table?
Answer Posted / radha sri seshu
second method is
select sal from emp e1 where 2=(select count(distinct(sal))
from emp e2 where e1.sal<=e2.sal);
Is This Answer Correct ? | 35 Yes | 22 No |
Post New Answer View All Answers
what is 'mysqlimport'? : Sql dba
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
What is sorting in sql?
How do I run a script in sql developer?
How to change the order of columns in Oracle SQL Plus ?
ERROR:Insert or update on table"accnt" violates foreign key constraints "acct_to_curr_symbol" DETAILS:KEY(accnt_curr_id)(-2)is not present in the table "curr_symbol" ......solve The Problem..
How can we implement rollback or commit statement in a trigger?
How many types of functions are there in sql?
how can we know the count/number of elements of an array? : Sql dba
What is ttitle and btitle?
What are expressions?
Explain the difference between sql and mysql.
what are the authentication modes in sql server? : Sql dba
what is a stored procedure? : Sql dba
What is sequence in sql?