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 / ananth
We can also use correlated subquery for this..
Select product from product a where 1 =
(select count(*) from product b where a.cost < b.cost);
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is the difference between dbm cfg and db cfg file in db2 ?
Which are the db2 tools to protect integrity of the database?
What is db2 stogroup?
Why do we use cursor?
I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?
List some fields from sqlca?
What is scrollable cursor in db2?
How to find the number of rows in a db2 table?
Define data page.
Which component is responsible for db2 startup and shutdown?
What is the connection string to connect to the DB2 Database ?
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.
Is schema the same as database?
What are the various data types available in db2?
What is db2 bind?