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 the use of value function?

728


What is the difference between db2 and oracle?

761


What is a plan and package in db2?

730


What is difference between alias and synonym in db2?

726


Why do we bind in db2?

736






Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

1984


What are the uses of db2 optimizer?

916


How can you count the number of rows from a table tab?

722


Explain about cursor stability?

696


What is multi row fetch in db2?

677


What is db2 purescale?

644


What is a system catalog table in db2?

683


What is access path in db2?

638


What are types of indexes?

675


What is the role of the data page in the db2 database?

671