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 bind in db2?

1096


What is difference between rollback and commit?

1205


What is a plan and package in db2?

1153


What is the physical storage length of timestamp data type?

1150


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

7671


How to find the number of rows in a db2 table?

1155


Explain various types of locks in db2?

1207


What is the function of logging in the db2 database?

1172


My sql statement select avg(salary) from emp yields inaccurate results. Why?

1132


what is a corelated subquerry?

1169


What is cobol db2?

1046


What is cloudant database?

1158


What is the use of with ur in db2?

1108


What is cursor in dbms?

1113


How can you classify the locks in db2?

1132