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 are the different types of base tables?
How do you concatenate the firstname and lastname from emp table to give a complete name?
How do I add a column to a table in db2?
What is package in cobol db2?
DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?
What is a storage group (stogroup)?
What is view db2?
How would the varchar column remarks defined?
What is check constraint in db2?
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.
Which is faster delete or truncate?
Cursors can be declared in both working-storage & procedure division, agreed. But is there any difference? If could you please suggest what is the difference
What is page size in db2?
Define declaration generator (dclgen).
Highlight all the advantages that are attached to a package.