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 not null in sql?

588


What is pl/sql table? Why is it used?

573


What are different functions in sql?

524


What are the dml statements?

698


Is it possible to update views?

548






What is normalization in sql?

533


what is myisam? : Sql dba

587


What is difference between primary and secondary key?

527


What is dcl in sql?

532


What version is sql?

563


what is clause? : Sql dba

602


How can triggers be used for the table auditing?

601


What is the use of %rowtype?

543


what is sql in mysql? : Sql dba

580


Can we perform dml in function?

602