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 / ramesh

Select * from table_name where rowid =(select min(rowid)
from tanle_name)
union
select * from table_name where rowid = (select max(rowid0
from table_name);

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is function and procedure?

986


What pl/sql package consists of?

1033


What are the operators used in select statements?

1002


What is cursor status?

1135


What is the difference between unique and primary key constraints?

1010


What is an exception in PL/SQL? What are the two types of exceptions?

1194


What are all types of user defined functions?

1006


What is a boolean in sql?

946


What is audit logout in sql profiler?

979


how to check myisam tables for errors? : Sql dba

1260


Can instead of triggers be used to fire once for each statement on a view?

896


how many values can the set function of mysql take? : Sql dba

935


What is synchronized subquery?

1093


What is t-sql? : Transact sql

928


What are the set operators in sql?

1032