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

I have a table(product),It contain fields(productname,cost).
I want to retrieve the product name ,which cost is second
maximum in the table?

Answer Posted / mr. cooooool

Hi............

SELECT PRODUCTNAME FROM PRODUCT WHERE COST = (SELECT MAX(COST)
FROM PRODUCT WHERE COST > (SELECT MAX(COST) FROM PRODUCT));

THANKS
REGARDS
RAVINDRA BISHT

Is This Answer Correct ?    13 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a db2 cursor?

1064


What is db2 and what is the use of db2 optimizer?

1071


How would the varchar column remarks defined?

1093


What are foreign keys in db2?

1114


How do you concatenate the firstname and lastname from emp table to give a complete name?

1077


Highlight all the advantages that are attached to a package.

1124


Why do we need reorg in db2?

998


Before you give the explain statement, what are the prerogatives?

1050


How to retrieve rows from a db2 table in embedded sql?

1401


What is check constraint in db2?

1097


Are view updateable?

1052


What is the usage of open cursor command?

1107


What is a trigger in the db2 database?

1096


What is db2 instance?

1110


How to find the number of rows in a db2 table?

1123