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 delimiter in sas?

1059


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

1134


What is thread join () in threading?

1017


Do ddl statements need commit?

974


Name three sql operations that perform a sort.

1018


Define implicit and explicit cursors.

1150


Can a commit statement be executed as part of a trigger?

1054


What is trigger in flip flop?

1007


What is difference between joins and union?

1129


what is the syntax for using sql_variant_property? : Transact sql

1049


What is delimiter sql?

1012


Why is sql important?

1112


Differentiate between sga and pga.

1167


How do I count duplicates in sql?

1113


How do you know if a relationship is 2nf?

946