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
The select into statement is most often used to create backup copies of tables or for archiving records?
How do I audit the sql sent to the server?
What does dml mean?
how can you see all indexes defined for a table? : Sql dba
What is the purpose of the primary key?
Explain some predefined exceptions.
What is the mutating table and constraining table?
How do I run a query in pl sql developer?
How to use distinct and count in sql query? Explain
What is oracle sql called?
What is rollback?
What are records give examples?
What is the difference between microsoft access and sql?
How do you copy a table in sql?
what's the difference between a primary key and a unique key? : Sql dba