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 ibm db2 client?
What is dbrm in db2 database?
in my project..TEST is db2 8.1 version In PROD it is 7.1 if i do REORG in TEST.. can I use the same REORG jcl with out modification in PROD region (this is DB2 8.1 )? if not, what modification i need to do in my REORG control card?
List out the data types available.
Why cursor is used in db2?
What is a Foreign Key?
Describe major components of db2?
What are db2 tables?
What is the meaning concurrency in the db2 database?
Outputs of explain are with matchcols = 0. What does this signify?
What is bufferpool in db2?
How can tablespace be moved to another dasd volume that is allocated for that tablespace?
When do you specify the isolation level?
What is scrollable cursor in db2?
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?