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

use Northwind
go

select top(1) * from Orders
union
select * from orders where orderid =
(select MAX(OrderID) from Orders)

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is foreign key and example?

916


What is a behavioral trigger?

961


Is join same as left join?

1021


What is a sql instance vs database?

1100


what is log shipping? : Sql dba

1093


What is union and union all keyword in sql and what are their differences?

1086


What is a database trigger?

1050


What information is needed to connect sql*plus an oracle server?

1007


How can I see all tables in sql?

1046


Is json a nosql?

957


What are sql triggers used for?

980


What is mutating error in pl sql?

1002


Explain normalization and what are the advantages of it?

938


What is an index? What are the types of indexes? How many clustered indexes can be created on a table?

1052


what does myisamchk do? : Sql dba

1002