Answer Posted / selvaraj v, anna university co
Find the HIGHEST SALARY in Employee Table :
-------------------------------------------
select * from emp where sal=(select max(sal) from emp)
order by empno;
Find the 3'rd HIGHEST SALARY in Emp Table :
-----------------------------------------------
SELECT * FROM EMP e WHERE 3=(SELECT COUNT(*) FROM EMP x
WHERE x.SAL>=E.SAL);
It's e,x are ALIAS NAME of EMP Table.
| Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
What is nosql example?
What is nested table in pl sql?
How do you change a value in sql?
What is the usage of when clause in trigger?
What are the various levels of constraints?
Is stored procedure faster than query?
What are reports usually used for?
what is “go” in t-sql? : Transact sql
How can I delete duplicate rows?
Is time a data type in sql?
what are the different functions in sorting an array? : Sql dba
What is the sql query to display the current date?
What is varray in pl sql?
define join and explain different type of joins? : Sql dba
Does pl/sql support create command?