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

What is role in db2?

612


What is page size in db2?

561


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

1800


Explain about rct in db2?

633


What is the use of reorg in db2?

602






How to create db2 table in mainframe?

629


What is the difference between using bind () and rebind () methods of naming class?

788


What type of database is db2?

523


Which are the db2 tools to protect integrity of the database?

688


What is difference between rollback and commit?

616


run jcl for cobol+db2 pgm?.. //jobcard //step001 exec pgm=ikjeft01 //systin dd * DSNSYSTEM(--------) RUN PROGRAM(MYPGMNAME) PLAN(-----), LIB(-------), PARMS(------) /* WHAT WILL U GIVE INSIDE THE BRACKETS... WHAT IS PLAN,PACKAGE,BIND?..PLAN N PACAKGES ARE GENERATED BY ?...

3788


Which isolation level provides highest data integrity?

593


What is a db2 schema?

760


what is a corelated subquerry?

654


Which component is used to execute the sql statements?

617