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
What is db2 instance?
How can you find out the # of rows updated after an update statement?
What is ibm db2 client?
What is the use of commit in db2?
What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?
Is schema the same as database?
How to connect to db2 database from windows command line?
What is the syntax for seeing the columns and data types of a table in the db2 database?
What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?
Define db2.
How will you return the number of records in table?
Can you tell me how can you find out the # of rows updated after an update statement?
What are the two types of logging in the db2 database? Explain them.
What is db2 catalog database?
How do I copy a table in db2?