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 are the different types of base tables?

1101


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

1077


How do I add a column to a table in db2?

1107


What is package in cobol db2?

1121


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

2861


What is a storage group (stogroup)?

1249


What is view db2?

1085


How would the varchar column remarks defined?

1092


What is check constraint in db2?

1095


Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.

2728


Which is faster delete or truncate?

1134


Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference

1444


What is page size in db2?

984


Define declaration generator (dclgen).

1123


Highlight all the advantages that are attached to a package.

1121