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 msql?
What is mysqli_free_result?
What is username in mysql?
Why do gaps in sequences occur?
How to create a trigger in mysql?
What is federated tables in mysql?
What is a storage engine? What are the differences between innodb and myisam engines?
What are the difference between mongodb and mysql?
Use a regular expression to find records. Use “REGEXP BINARY” to force case-sensitivity. This finds any record beginning with r.
what is the default port for mysql server? : Mysql dba
How do I rename a procedure?
about join
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)