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 a heap in sql?

994


How do you create an update query?

917


What is sql trigger example?

1000


What are the different types of a subquery?

983


What are triggers in sql?

974


What are the disadvantages of not performing database normalization?

1097


what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba

990


Why having clause is used in sql?

931


how to select first 5 records from a table? : Sql dba

922


Is full outer join same as cross join?

915


why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

1044


What is the difference between inner join and left join?

938


What is a behavioral trigger?

932


How can you load microsoft excel data into oracle? : aql loader

1130


What are sql procedures?

967