how to find 2nd highest salary in random database salary of employer.....
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
What are the limitations of mysql?
How do I enable mysqli extension?
What is clob datatype?
What is information_schema in mysql?
Why is the basic difference between left join, right join and inner join?
Is mysql workbench a dbms?
Is mysql is a programming language?
Which is better sqlite or mysql?
How do I start mysql database?
How is myisam table stored?
Is mysql owned by oracle?
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.