how to find the second highest salary from emp table?
Answer Posted / prudhvi
select sal from emp a where 1=(select count(*) from emp b where a.sal>b.sal);
Try this guys,if u want highest sal use 0 in where condition, for second highest 1,third 2........
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the limitations of sql express?
Why is sql important?
What are hotfixes and patches?
How do I run sql?
what is 'mysqld'? : Sql dba
What are the different types of a subquery?
what is the command line end user interface - mysql? : Sql dba
Is sql a oracle?
What does the base_object_type column shows in the user.triggers data dictionary view?
Is pl sql and postgresql same?
Explain the update statement in sql
What is sqlca in powerbuilder?
How many postgresql users are there, worldwide?
What are the types of keys?
How does sql developer connect to oracle database?