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
List some fields from sqlca?
Explain correlated sub-queries.
What are the rules for db2 programming?
How will you return the number of records in table?
define clustering index.
What is alias in db2?
Name the various locking levels available?
How can you validate Sql errors during cursor operation in db2 pgms and where do you code?
What is the usage of open cursor command?
What are foreign keys in db2?
SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected
What is host variable in db2 cobol?
What is data manager?
What does sqlcabc has?
Is ibm db2 open source?