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 / siri
select productname from product p where 2=(select count(*) from product q where p.cost<=q.cost)
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is the maximum No of rows per page?
What is package in db2 mainframe?
How do you simulate the explain of an embedded sql statement in spufi/qmf?
What is the difference between dbm cfg and db cfg file in db2 ?
Give the name of some fields form sqlca.
For a db2 column that is being defined as decimal (11, 2), discuss the cobol picture clause.
Why do we bind in db2?
I understand Join always perform better than subqueries. Then what is the advantage/use of Subqueries/correlated subqueries etc.,in DB2 programming.Please explain.
What is db2 plan table?
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.
Is it possible using max on a char column?
What are the full forms of spufi and dclgen and why are they used?
What is with ur in db2?
What is a cursor in programming?
Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.