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

How to change sql*plus system settings?

1065


What does subquery mean in sql?

1062


Explain the uses of a database trigger?

1047


How do you determine the current isolation level? : Transact sql

1166


What is Collation Sensitivity ? What are the various type ?

962


What is optimistic concurrency control? : Transact sql

994


Is not equal in sql?

1019


What are the three forms of normalization?

1052


How to use boolean type in select statement?

1087


What is the execution plan in sql?

1038


which command using query analyzer will give you the version of sql server and operating system? : Sql dba

1067


What are different types of sql commands?

1130


what are numeric data types? : Sql dba

1065


Write a sql query to get the third highest salary of an employee from employee_table?

1080


Can you rollback after commit?

998