how to find the second highest salary from emp table?
Answer Posted / ram achare
for 2nd highest salary
select sal from(select distinct sal from emp order by sal desc limit 2)emp order by salary limit 1;
for 3rd highest salary
select sal from(select distinct sal from emp order by sal desc limit 3)emp order by salary limit 1;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
how to rename an existing table in mysql? : Sql dba
Is sql developer case sensitive?
How do I view a sql database?
What is equi join in sql?
What is a data definition language?
How do you concatenate in sql?
Explain the advantages and disadvantages of stored procedure?
Is natural join and inner join same?
what is the difference between inner and outer join? Explain with example. : Sql dba
What are predefined functions in sql?
Explain the insert into statements in sql?
Can there be 2 primary keys in a table?
How do I partition a table in sql?
What is the difference between left and left outer join?
Is delete faster than truncate?