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 the benefit of foreign key?

1022


What is a sql statement?

969


Is keyword pl sql?

1010


What is sql exception?

976


What is the function that is used to transfer a pl/sql table log to a database table?

1026


How to start the command-line sql*plus?

1058


Can unique keys be null?

915


tell me about various levels of constraint. : Sql dba

1035


How many postgresql users are there, worldwide?

1065


i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5

4025


Can you select everything, but 1 or 2 fields, without writer's cramp?

985


What plvcmt and plvrb does in pl/sql?

1324


What are the parts of a basic sql query?

968


what is the command used to fetch first 5 characters of the string? : Sql dba

1639


How to Declare Fixed Length String Value In PL SQL

1158