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 the use of mysql workbench?
How do I restart mysql on windows?
How do you stop an access query?
How do I clear a mysql database?
How do I change global variables in mysql?
What is diff b/w MYISAM and INNODB storage engine. and also define the benifits and drawbacks of both storage engine
Does mysql use t sql?
How to use in conditions?
is it possible to assign two primary key in a table
What is myisam?
What is difference between mysql mysqli and pdo?
How do I grant privileges to a user in mysql phpmyadmin?
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)