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

Hi Everyone,
How to get fist and last record from a table in oracle?

Thanks in advance

Answer Posted / gourav

select * from emp(table name)
where rownum = 1 and 30



this query will display the first and last record


for eg rownum start from 1 and rownum last record is 30..by
execute this query u wil get frst and last reord

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is type and rowtype in pl sql?

967


What does bitemporal mean?

1010


What is dcl in sql?

907


Can we use view in stored procedure?

865


How to execute a stored procedure?

1036


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

978


how to fetch alternate records from a table? : Sql dba

1053


What is the starting oracle error number?

999


Can we insert in view in sql?

1004


Is natural join and inner join same?

854


What makes a good primary key?

981


What is query optimization in sql?

941


Define tables and fields in a database

1081


what are sequences

1622


What do you mean by “trigger” in sql?

1019