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
What is bind in db2?
What is difference between rollback and commit?
What is a plan and package in db2?
What is the physical storage length of timestamp data type?
How to test SQL -911 error while developing COB-DB2 program
How to find the number of rows in a db2 table?
Explain various types of locks in db2?
What is the function of logging in the db2 database?
My sql statement select avg(salary) from emp yields inaccurate results. Why?
what is a corelated subquerry?
What is cobol db2?
What is cloudant database?
What is the use of with ur in db2?
What is cursor in dbms?
How can you classify the locks in db2?