how to find 2nd highest salary in random database salary of employer.....

Answers were Sorted based on User's Feedback



how to find 2nd highest salary in random database salary of employer.......

Answer / narendra sharma

select column_name from table_name order by column_name
desc limit 1,1

Is This Answer Correct ?    12 Yes 6 No

how to find 2nd highest salary in random database salary of employer.......

Answer / arnab das

select distinct column_name from table_name order by
column_name desc limit 1,1

Is This Answer Correct ?    6 Yes 4 No

how to find 2nd highest salary in random database salary of employer.......

Answer / rajasekhar.s

select distinct a.sal from emp a where
n=(select count(distinct b.sal)
from emp b where a.sal<=b.sal)

Is This Answer Correct ?    1 Yes 1 No

how to find 2nd highest salary in random database salary of employer.......

Answer / pankajbisane

select emp_name, salary from employee where salary = (select MAX(salary) from employee
WHERE salary <> (select MAX(salary) from employee ))

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MySQL Interview Questions

What are the limitations of mysql?

0 Answers  


How do I enable mysqli extension?

0 Answers  


What is clob datatype?

0 Answers  


What is information_schema in mysql?

0 Answers  


Why is the basic difference between left join, right join and inner join?

0 Answers  


Is mysql workbench a dbms?

0 Answers  


Is mysql is a programming language?

0 Answers  


Which is better sqlite or mysql?

0 Answers  


How do I start mysql database?

0 Answers  


How is myisam table stored?

0 Answers  


Is mysql owned by oracle?

0 Answers  


in a master-master replication with two masters and alternate slaves running on two systems.can i have a script or any mysql command to know which one is right now acting as master.

1 Answers  


Categories