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...

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


Please Help Members By Posting Answers For Below Questions

What is the meaning concurrency in the db2 database?

1097


What are the benefits of using the db2 database?

1210


What is package in db2 mainframe?

968


Explain about dbrm.

1030


How to fetch the last row from the table in SQL (db2)?

1632


Define data page.

1048


Which isolation level provides maximum concurrency?

1141


Which component is responsible for processing sql statements and selecting access paths?

1116


What is difference between alias and synonym in db2?

1118


Which component is used to execute the sql statements?

1082


What does sqlcabc has?

1032


What is cursor with hold option in db2?

1052


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

1060


How do you select a row using indexes in db2?

1119


What is a trigger in the db2 database?

1059