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 is mysql and how it works?
How can you retrieve a particular number of records from a table?
How to check server status with 'mysqladmin'?
How do I export mysql query results to excel?
How do I update a variable in mysql?
What is query log in mysql?
what is constraints?
How can you export the table as an xml file in mysql?
How do I get a list of table names in mysql?
What is the difference between timestamp and datetime in mysql?
Explain % and _ inside like statement?
How do I show users in mysql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)