how to get second highest salary in SQL(as/4000

Answer Posted / selvaraj v , anna univ coe

SELECT * FROM Employee e
WHERE 2=(SELECT COUNT(DISTINCT Salary) FROM Employee x
WHERE x.Salary >= e.Salary);

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can triggers stop a dml statement from executing on a table?

616


how to convert numeric values to character strings? : Sql dba

566


What is difference between pl and sql?

528


what is top in tsql? : Transact sql

541


what is the difference between where clause and having clause? : Sql dba

533






how to convert character strings to numeric values? : Sql dba

572


What is the most important ddl statements in sql are?

521


What does stand for in sql?

522


What do you think about pl/sql?

529


Can we create index on primary key?

524


Why do we create views in sql?

554


what is error ora-03113: end-of-file on communication channel?

599


What is exit statement?

543


Are sql connections encrypted?

556


column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.

6078