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 / vineeth varghese

(Select product from product where cost = (Select Max (cost) from product where cost not = (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

Is db2 relational database?

651


When the like statement is used?

732


Highlight all the advantages that are attached to a package.

729


What is a db2 schema?

862


What is coalesce in db2?

766






What is the difference between db2 and oracle?

761


What is check constraint. Explain with example.

729


What is dbrm? What it contains?

790


What is the syntax for creating a table in the db2 database?

721


can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well

1900


What are packages in db2?

689


Why select is not preferred in embedded sql programs?

817


What is runstats db2?

668


What is the advantage in De-normalizing tables in DB2?

837


What is dbrm?

736