how to find the second highest salary from emp table?
Answer Posted / abhi
select max(sal)from emp where sal <> (select max(sal)from emp)
OR
select max(sal)from emp where sal < (select max(sal)from emp)
OR
select max(sal)from emp where sal != (select max(sal)from emp)
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How many rows can sqlite handle?
What is transaction control language (tcl)?
What is mutating sql table?
What is the location of pre_defined_functions.
Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?
What is dml and ddl?
Where can I learn sql for free?
What are different types of indexes?
Why do we use triggers?
How to know the last executed procedure?
What is a system versioned table?
What is sql data?
Are stored procedures faster than queries?
Enlist some predefined exceptions?
How long does it take to learn pl sql?