select 100 records from million records ?

Answers were Sorted based on User's Feedback



select 100 records from million records ?..

Answer / prachi

SELECT * FROM TABLENAME
FETCH FIRST 100 ROWS ONLY;

This will fetch 1st 100 records

Is This Answer Correct ?    20 Yes 0 No

select 100 records from million records ?..

Answer / ankit.:-)

if u want to fetch first 100 go for

select * from tablename fetch only 100 rows;

this will select only 100

Is This Answer Correct ?    5 Yes 5 No

Post New Answer

More DB2 Interview Questions

I have a table name Table1 which contain columns Cust_no, car_model, country, salesamt. The records are 101, Fiat, India, 12345 2nd record is 102, Tata, USA, 98743 3rd record is 101, indica, India, 65342 4th record is 103, Toyota, UK, 64522 5th record is 103, Maruti, USA, 98632 and so on..... Now my question is write sql query which will give me detail about the sum of sales amount in perticular country

2 Answers   IBM,


For Null indicator we have 3 values 0,-1,-2. 0->Not nulll -1->Null -2->Value truncated If ther is any possibility to have any positive value other than 0 in Null indicator.If it is so then when we will get and what is the value?

1 Answers   BNP Paribas,


DB2 is a A) data base/data communication system B) data base C) RDBMS D) Programming language

4 Answers   Accenture,


I HAVE 2 TABLES ONE IS EMP_TABLE AND ANOTHER DEPT_TABLE.EMP_TABLE CONTAINS NAME,DEPTNO,DEPTNAME,LOCATION AND DEPT_TABLE CONTAINS DEPTNO,DOJ(DATE OF JOINING).I WANT TO DISPLAY NAME,DEPTNAME,DOJ AND WHO ARE JOINED BETWEN 01- JAN-2007 TO 01-JAN-2008?

6 Answers   Perot Systems,


Compare a subselect to a join?

1 Answers  






What is concurrency in db2?

1 Answers  


What is the difference between plan and package in db2?

0 Answers  


how can i pull up a query which was previously stored in qmf

3 Answers  


How we create a tables in db2,what is the process/syntax to create a table with example plz?

2 Answers  


What is runstats utility in db2?

0 Answers  


Plan has the optimized access path in it. But is that optimized access path is attained or known

1 Answers   IBM,


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

0 Answers   IBM,


Categories