Shall i use this query to retrieve first 4 records,
Select empno, sal from emptbl where empno < 5. like this can
we fetch first 100 records?
Answer Posted / madhu t
if empno is a primary key then the records in table are
stored in ascending order of empno. hence we can use empno
< 5 to fetch the first 4 records of table.
There is also a standar query to fetch the first 10/100/200
records as below...
select empno,sal from emptble fetch first 100 rows only;
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is bind package and plan in db2?
What is the difference between using bind () and rebind () methods of naming class?
What parameters are used to control the free space in DB2?
How can you count the number of rows from a table tab?
can all users have the privilage to use the sql statement select * (dml)?
Give the name of some fields form sqlca.
What is db2 stogroup?
How is a typical db2 batch pgm executed?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
Can we update view in db2?
What is runstats db2?
What are iseries servers?
How can we read records for specific member in CL? AND rpg?
What is database manager in db2?
What is the role of data manager in the db2 database?