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 / venkat ramana

SELECT PRODUCTNAME
FROM PRODUCT
WHERE COST < (SELECT MAX(COST)FROM PRODUCT)
ORDER BY COST DESC
FETCH FIRST 1 ROW ONLY ;

HOPE THE ABOVE QUERY WILL PROVIDE YOU THE DESIRED RESULT.

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cloudant database?

1104


List out the buffer pools in db2

1080


What is scrollable cursor in db2?

1059


What is the latest version of ibm db2?

1273


How do I delete a table in database?

1035


What r the comman abends in db2, jcl and cobol???????

2268


What does reorg do in db2?

1040


What is an instance in db2?

1044


What is a page in db2?

1032


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

1112


How is a typical db2 batch pgm executed?

1185


How to create db2 table in mainframe?

1158


What is drop table?

1020


what are bind concepts in db2 cobol?

1102


What does db2 blu stand for?

1175