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 a delimiter in sas?
what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba
What is thread join () in threading?
Do ddl statements need commit?
Name three sql operations that perform a sort.
Define implicit and explicit cursors.
Can a commit statement be executed as part of a trigger?
What is trigger in flip flop?
What is difference between joins and union?
what is the syntax for using sql_variant_property? : Transact sql
What is delimiter sql?
Why is sql important?
Differentiate between sga and pga.
How do I count duplicates in sql?
How do you know if a relationship is 2nf?