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 / rajasekaran
with e as (select product_name,cost,rank() over(order by
cost desc) as rk from product) select * from e where rk=2;
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
what is utility for parm lib
Define sqlca.
What is a storage group (stogroup)?
Mention the various locks that are available in db2.
How to fetch the last row from the table in SQL (db2)?
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?
How to create db2 table in mainframe?
What is coalesce in db2?
Why db2 is called db2?
Explain the function done by data manager?
What is runstats utility in db2?
How many databases can be created inside an instance in db2 ?
What is data manager?
Give a brief description of db2 isolation levels?
What do you mean by rollback?