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 package in cobol db2?
What is db2 bind process?
What action db2 takes when a program aborts in the middle of a transaction?
what is the role of the cursor in db2?
by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?
How do I copy a table in db2?
Can we update view in db2?
What are bind parameters in db2?
Can we insert update delete in view?
List out the buffer pools in db2
Following a db2 update statement, what is the quickest way to compute the total number of updated rows?
Mention the various locks that are available in db2.
What is a db2 cursor?
What is difference between alias and synonym in db2?
If anyone has IBM Certification Dumps pls forward to me & also let me know what are the Certification Codes that are available in DB2