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 / dinesh m
A)
select productname from product
where cost=(Select max(cost) from product where cost not in
(select max (cost) from product) );
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain the contents that are a part of dclgen.
What is a bind in db2?
What is db2 command?
How to create db2 table in mainframe?
What is coalesce in db2?
I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.
What is rebind in db2?
Discuss about db2 bind?
Why cursor is used in db2?
What is the role of data manager in the db2 database?
Mention the length of physical storage of the given data types of db2 – date, timestamp, time
How can deadlocks be resolved?
What does sqlcabc has?
What is clone table?
What are db2 objects?