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 package in db2 and its advantages?
Mention the way of highlighting as well as putting a cursor to use in a cobol program.
How do you pull up a query which was previously saved in qmf?
List down the types of triggers in the db2 database?
What are foreign keys in db2?
What is the use of db2 optimizer?
What is null in db2?
Explain how can you do the explain of a dynamic sql statement?
How do we specify index to include or not during bind process.
How to fetch the last row from the table in SQL (db2)?
What are the various isolation levels possible?
What is lock escalation in db2?
How to get the ddl of a table in db2?
Which isolation level provides maximum concurrency?
What is the clustering index in the db2 database?