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 / pc
select productname from product where cost=(select max(cost) from product where cost<> (select max(cost) from product));
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is access path in db2?
Can you use max on a char column?
What is dbrm in db2 database?
Name the various locking levels available?
Define sqlca.
How do you find the maximum value in a column in db2?
What is package in cobol db2?
What happens in bind step in a db2 program?
Why do we bind in db2?
What is null indicator in db2?
When reorg is used?
What are catalog tables in db2?
What is a db2 tablespace?
What is db2 plan table?
In an sql table that is embedded, what is the procedure to retrieve rows that are part of a db2 table?