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

List some fields from sqlca?

1000


Explain correlated sub-queries.

971


What are the rules for db2 programming?

1038


How will you return the number of records in table?

879


define clustering index.

974


What is alias in db2?

980


Name the various locking levels available?

1034


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

2166


What is the usage of open cursor command?

1032


What are foreign keys in db2?

1031


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

11611


What is host variable in db2 cobol?

1027


What is data manager?

993


What does sqlcabc has?

993


Is ibm db2 open source?

1010