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 does runstats do in db2?
What is difference between rollback and commit?
What are iseries servers?
Name the various locking levels available?
What is the maximum size of varchar data type in db2?
What is the difference between cursor stability and repeatable read isolation levels?
What is multi row fetch in db2?
What are the two types of logging in the db2 database? Explain them.
What is database reorganization?
What types of tables are there in the db2 database?
What is the reason behind not using select * in embedded sql programs?
How many databases are there?
What is runstats utility in db2?
While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?
On which levels locks can be applied?