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 the connection string to connect to the DB2 Database ?

702


what is the responsibility of the construction superintendent

1746


Mention the various locks that are available in db2.

698


Mention the definition of cobol in varchar field.

776


Is the primary key a clustered index?

726






what is db2 restart?

1780


What is the use of reorg in db2?

699


What is rct?

847


What is a db2 tablespace?

690


What is scrollable cursor in db2?

691


Explain the function done by data manager?

927


What is image copy in db2?

649


What is a trigger in the db2 database?

670


What is dbrm library?

664


What is commit in db2?

687