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 / mr. cooooool
Hi............
SELECT PRODUCTNAME FROM PRODUCT WHERE COST = (SELECT MAX(COST)
FROM PRODUCT WHERE COST > (SELECT MAX(COST) FROM PRODUCT));
THANKS
REGARDS
RAVINDRA BISHT
| Is This Answer Correct ? | 13 Yes | 15 No |
Post New Answer View All Answers
Explain the function of data manager.
what is db2 restart?
Explain packages.
What is the use of db2?
Can there be more than one cursor open for any program?
My sql statement select avg(salary) from emp yields inaccurate results. Why?
How can we read records for specific member in CL? AND rpg?
Explain about cursor stability?
Is db2 a programming language?
What is the physical storage length of timestamp data type?
How can you validate Sql errors during cursor operation in db2 pgms and where do you code?
what is a corelated subquerry?
What is buffer pool in the db2 database?
When the like statement is used?
Why do we use cursor?