how to find the second highest salary from emp table?
Answer Posted / chirag shah
select DISTINCT(salary) from emp order by salary desc limit 1,1
this limit gives you 2nd record
if you want 3rd value then write limit 3,1
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can we alter stored procedure?
what are the different functions in sorting an array? : Sql dba
what is a primary key? : Sql dba
Can we use pl sql in mysql?
what are string data types? : Sql dba
How to sort the rows in sql.
Is a view faster than a stored procedure?
What is a boolean in sql?
Is sqlite thread safe?
What is t sql in sql server?
What is the unique index?
Why do we use procedures in sql?
Can we perform dml in function?
Which is faster truncate or drop?
What is a Mapplet?