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
Can we rollback delete command?
What is the maximum number of rows in sql table?
What is sql entity?
what are the limitations of identity column? : Transact sql
Can we join same table in sql?
what is a trigger in mysql? : Sql dba
Explain what is a database?
Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints
What is a variable in sql?
Mention what does plv msg allows you to do?
Does truncate table reset auto increment?
Why do we need cursor in pl sql?
describe transaction-safe table types in mysql : sql dba
What is bind reference and how can it be created?
how to drop an existing table in mysql? : Sql dba