how to find the second highest salary from emp table?
Answer Posted / sagar
if the salary is simple non-duplicate salary, you can use
the below queries:
select max(sal) from emp where sal != (select max(sal) from emp)
you can also try
select sal from (select * from emp order by sal desc) where
rownum = 2
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
differentiate between float and double. : Sql dba
what is query cache in mysql? : Sql dba
Why coalesce is used in sql?
What is database migration?
Explain what is a field in a database and record in a database?
Is there a 64 bit version of ssms?
Can we change the table name in sql?
Is a table valued function object?
Can we use pl sql in mysql?
What are sql triggers used for?
What is primary key and foreign key with example?
What are literals in sql server?
what is union, minus and interact commands? : Sql dba
I need a function for a train ticket reservation please answer it thanks in advance
How do you write an inner join query?