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 / pratap
A)Select product, Max (cost) from product where cost <
(select max (cost) from product);
| Is This Answer Correct ? | 7 Yes | 13 No |
Post New Answer View All Answers
Is it possible using max on a char column?
What r the comman abends in db2, jcl and cobol???????
What is a trigger in the db2 database?
What is explain in db2?
What does reorg do in db2?
How do you select a row using indexes in db2?
Can we insert update delete in view?
Is it possible to create an Instance in DB2 using DB2 Control Center ?
What is db2 optimizer?
Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?
What is the role of schema in the db2 database?
Mention data types used in db2 ?
Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?
What is schema in db2?
In case if at some point of time db2 is down, would that impact the pre-compilation process of a db2-cobol program?