how to find the second highest salary from emp table?
Answer Posted / radha sri seshu
second method is
select sal from emp e1 where 2=(select count(distinct(sal))
from emp e2 where e1.sal<=e2.sal);
| Is This Answer Correct ? | 35 Yes | 22 No |
Post New Answer View All Answers
What are %type and %rowtype for?
What is a composite primary key?
Which data type is a composite type?
What is the difference between function, procedure and package in pl/sql?
What is update query?
What is record data type?
what are dynamic queries in t-sql? : Transact sql
What is a temporal table?
what is a composite primary key ? : Sql dba
how to create a new table in mysql? : Sql dba
Can we use pl sql in sql server?
What is a unique key?
What is recursive stored procedure?
how to analyze tables with 'mysqlcheck'? : Sql dba
What is the main difference between sql and pl/sql?