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 does runstats do in db2?
What is the purpose of rollback and commit?
Discuss about db2 bind?
Explain about rct in db2?
Explain package in db2 and its advantages?
What is isolation level in db2?
What are host variables in db2?
How do I change the column size in db2?
Define check constraint.
What are concurrency issues?
What is table space in db2?
What is the difference between db2 and oracle?
Explain about dbrm.
What does reorg do in db2?
What is db2 instance?