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

Do stored procedures prevent sql injection?

1015


How can we find duplicate records in a table?

997


What is difference between table and view?

1142


What is the use of sql trace?

1006


What is sql lookup?

978


Could you please provide oca (oracle 10g) dumps for my certification ?

5244


How many types of keys are there in sql?

1091


how to create a new view in mysql? : Sql dba

989


How to change sql*plus system settings?

1113


Do we need to rebuild index after truncate?

1101


What is a sql*loader control file?

1346


how to use 'mysql' to run sql statements? : Sql dba

1123


What is sql prepared statement?

1037


Explain exception handling in pl/sql?

1084


What does t sql mean?

1004