if there is a table with huge number of records and if i
want to extract only first 3 records from the table, what
query i have to provide to retreive first 3 records

Answer Posted / gummadi

select * from table_name
order by ascending
fetch first 3 rows only

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is db2 command?

769


What is the difference between bind and rebind in db2?

1179


What is buffer pool?

841


Is db2 free?

857


What is bind package and plan in db2?

801


How do you select a row using indexes in db2?

841


How do we specify index to include or not during bind process.

1857


what are bind concepts in db2 cobol?

829


Mention the way of highlighting as well as putting a cursor to use in a cobol program.

835


What is the clustering index in the db2 database?

746


What is image copy in db2?

753


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 ?

2087


What do you mean by commit and rollback?

773


Which are the db2 tools to protect integrity of the database?

900


How will you return the number of records in table?

701