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 / pc

select productname from product where cost=(select max(cost) from product where cost<> (select max(cost) from product));

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is access path in db2?

923


Can you use max on a char column?

1026


What is dbrm in db2 database?

1032


Name the various locking levels available?

1035


Define sqlca.

1052


How do you find the maximum value in a column in db2?

1052


What is package in cobol db2?

1073


What happens in bind step in a db2 program?

913


Why do we bind in db2?

1137


What is null indicator in db2?

1049


When reorg is used?

1070


What are catalog tables in db2?

979


What is a db2 tablespace?

995


What is db2 plan table?

991


In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?

1048