Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

find the third highest salary?

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


Please Help Members By Posting Answers For Below Questions

What is a file delimiter?

1164


What are the two characteristics of a primary key?

1032


Can we write ddl statements in functions?

1182


What are sql commands?

1067


Can we use distinct and group by together?

1104


how to present a past time in hours, minutes and seconds? : Sql dba

1071


What is an alias command?

1119


what are date and time intervals? : Sql dba

1105


What does where 1 1 mean in sql?

1077


How to combine two stored procedures in sql?

1325


What is a sql*loader control file?

1344


what is a trigger? : Sql dba

1092


What is partition by in sql?

1127


what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba

1067


What is sql resultset?

1040