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 out the second highest salary?

Answer Posted / priyankur

@peter: your query is pretty cool but it wont work when
there are multiple salaries with same amount. I mean three
persons have same salary 24000, which is MAX sal in salary
table. In that case, below query will work.

select a.salary from employees a where 1 = (select count
(distinct b.salary) from employees b where
a.salary<b.salary)

Digit 1 is (n-1) where n is nth value. Here n is 2(Second
highest salary).

I would appreciate if anybody tried to break my above query
and explain how does this work.

Is This Answer Correct ?    7 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a relational database management system?

1120


What is the difference between post-database commit and post-form commit?

1198


What happens to indexes if you drop a table?

1169


Whats the benefit of dbms_stats over analyze?

2002


In SAP ECC 6.0 , under DB02 tcode , Tablespace name to be explain stepy step all the col

4174


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1933


What operating systems are supported by oracle database 10g xe?

1034


what is normalisation?what are its uses?

2273


What is recycle bin in Oracle?

1149


what is meant by magic query

2186


What is connection pooling in oracle?

973


Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run subsequently every other day at 2AM.

1947


Explain how are indexes update?

1064


How do I limit the number of oracle database connections generated by weblogic server?

1070


Explain the use of record length option in exp command.

1067