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 / ananth
We can also use correlated subquery for this..
Select product from product a where 1 =
(select count(*) from product b where a.cost < b.cost);
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is innodb buffer pool?
How to find schema of a table in db2?
What is the advantage in De-normalizing tables in DB2?
What db2 400?
What is a db2 package?
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?
How can you count the number of rows from a table tab?
What does db2 stand for?
What is the function of logging in the db2 database?
How do I delete a table in db2?
What is image copy in db2?
What is the result of open cursor statement?
Explain various types of locks in db2?
what is the responsibility of the construction superintendent