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

Why is mysql used?

0 Answers  


How do I find the database name in mysql?

0 Answers  


What is the difference between timestamp and datetime in mysql?

0 Answers  


What is the difference between primary and unique key

5 Answers   CSC,


How do I backup mysql database on linux?

0 Answers  






what programming language which is used for testing and developement in sql?

3 Answers  


What is unique key in mysql?

0 Answers  


How to set the time zone for MySQL to particular country time?

0 Answers  


What are the technical features of MySQL?

0 Answers  


What is the difference between mysql_fetch_array and mysql_fetch_object?

4 Answers   CTS,


How do I check mysql version?

0 Answers  


How do you backup a database in mysql?

0 Answers  


Categories