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 / dinesh m

A)
select productname from product
where cost=(Select max(cost) from product where cost not in
(select max (cost) from product) );

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is nvl in db2?

1100


How do I add a column to a table in db2?

1105


What is the role of union all and union

1129


ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE

2071


How can you count the number of rows from a table tab?

1093


DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

2857


I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?

2394


How to check table size in db2 sap?

1042


When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?

3581


What is table space in db2?

1021


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

2219


What is page size in db2?

979


Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?

1087


How to check last update on table in db2?

1062


What is the difference between nvl and coalesce?

1065