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

Explain the function of data manager.

1031


what is db2 restart?

2135


Explain packages.

1094


What is the use of db2?

1037


Can there be more than one cursor open for any program?

1160


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

1077


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

681


Explain about cursor stability?

1025


Is db2 a programming language?

1032


What is the physical storage length of timestamp data type?

1075


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

2202


what is a corelated subquerry?

1108


What is buffer pool in the db2 database?

1081


When the like statement is used?

1209


Why do we use cursor?

1085