Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have a table which has thousand of records i want to
fetch only record num 100 to record num 200. Write a query
that satisfies this criteria.(Cant use any keys)
Anyone please reply ASAP!

Answer Posted / om prakash yadav

Note= Before i given the query it is worng pleas ignopre it.
Thanks.
========================================

using cursors you can do>


CURSOR Crs_trs IS
SELECT empno, empname, sal, deptno from emp WHERE empno
between 100 and 200;

vr_empno.empno%type;
vr_empname.empname%type;
vr_sal.sal%type;
vr_deptno.deptno%type;

BEGIN
OPEN Crs_trs;
IF crs_trs%ISOPEN THEN
LOOP
FETCH Crs_trs INTO vr_empno, vr_empname, vr_sal, vr_deptno;

dbms_output.put_line('empno__'||vr_empno );
dbms_output.put_line('empname__'||vr_empname);
dbms_output.put_line('empsalary__'||vr_empsal );
dbms_output.put_line('empdeptno__'|| vr_deptno);

EXIT WHEN Crs_trs%NOTFOUND;
END IF;
END LOOP;
CLOSE Crs_trs;
END;

Is This Answer Correct ?    1 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to execute stored procedure in db2 command editor?

986


What are the various isolation levels possible?

1051


What are the two types of logging in the db2 database? Explain them.

1019


Can we delete records from view?

916


Mention the way of highlighting as well as putting a cursor to use in a cobol program.

1020


What does db2 plan contain?

961


What is the meaning concurrency in the db2 database?

1061


What is db2 look?

970


What is check constraint in db2?

1014


What is query_cache_limit?

930


Which component is responsible for db2 startup and shutdown?

985


What is the latest version of ibm db2?

1203


What is null indicator in db2?

1054


what is the role of the cursor in db2?

1002


Explain the contention situations caused by locks?

1014