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...

how to calcuate the second highest salary of he employee

Answer Posted / hari krishna j

SELECT A.SAL FROM EMP_TAB A
WHERE 1=(SELECT COUNT(*) FROM EMP_TAB B
WHERE B.SAL > A.SAL)

Change value of 1 if
0 - First heighest sal
1 - Second " "
2 - Third heighest sal
.
.
.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain ttitle and btitle.

1165


What is identity column in sql server?

1102


What are tables and fields?

1087


What can you do with pl sql?

1145


Can procedure in package be overloaded?

1144


What is an escape character in sql?

1074


What is the location of pre_defined_functions.

1212


Is sql harder than python?

1159


what are the advantages of sql ? : Sql dba

1110


What is composite primary key in sql?

1043


What is sap sql?

1030


How do I partition a table in sql?

1209


what is column? : Sql dba

1052


What will you get by the cursor attribute sql%found?

1009


Which sorts rows in sql?

1057