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

select productname from product p where 2=(select count(*) from product q where p.cost<=q.cost)

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cursor stability in db2?

1336


in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?

2064


What is the difference between dbm cfg and db cfg file in db2 ?

1518


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

2202


How can deadlocks be resolved?

925


What is view db2?

1051


What is ibm db2 used for?

1053


What is a db2 package?

1034


How to create backup table in db2?

1071


How can record locking be achieved in those DB2 versions which do not support it?

1060


What is scrollable cursor in db2?

1042


Is db2 relational database?

962


What is rebind in db2?

1037


Which command is used to connect to a database in DB2 ? Give the Syntax.

1085


Is db2 a mainframe database?

978