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 explain plan in db2?

944


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

2197


can we view the access paths created by dbrm ? how ? thx

6980


What is a bind in db2?

985


What are db2 tables?

1053


before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?

2125


How to test SQL -911 error while developing COB-DB2 program

7445


Explain package in db2 and its advantages?

1139


How do we specify index to include or not during bind process.

2072


What is host variable?

1016


How can we read records for specific member in CL? AND rpg?

649


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

1016


I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.

3147


What are the prerogatives?

1016


I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.

2011