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
what is index? : Sql dba
Can we create table inside stored procedure?
What is pl/sql language case sensitive?
what is online transaction processing (oltp)? : Sql dba
What is dba in sql? : SQL DBA
How do you add a column to a table?
How do you modify a trigger?
Which certification is best for sql?
Can we alter stored procedure?
Are sql database names case sensitive?
How can you view the errors encountered in a trigger?
What is java sql connection?
What is full join?
what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba
Write a sql query to get the third highest salary of an employee from employee_table?