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

What is an oracle stored procedure?

1117


What are database links used for?

1102


What is the purpose of my sql?

1016


What does count (*) mean in sql?

1663


What are the built in functions of sql?

1107


What is implicit cursor in pl sql?

1162


How many types of cursors are available in pl/sql?

1178


what is bcp? When is it used?

1189


What are different sql data types?

1138


How do I save the results of sql query in a file?

1024


What is the purpose of the sql select top clause?

1220


What are all different types of collation sensitivity?

1088


How do I start sql from command line?

1092


Is sql low level language?

1069


What is on delete set null?

1142