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 / ashwani kumar singh

SELECT * FROM EMP WHERE ROWNUM < 2
UNION
SELECT * FROM (SELECT * FROM EMP ORDER BY EMPNO DESC )
WHERE ROWNUM < 2

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does a self join work?

1132


How do you go back in sql?

993


What are the different types of functions in sql?

1058


how can we know the number of days between two given dates using mysql? : Sql dba

1048


How can a pl sql block be executed?

949


What is compilation error in pl sql?

985


How do I create a sql script?

1105


What can you do with pl sql?

1097


What is sql engine in oracle?

994


What is the left table in sql?

971


Why left join is used in sql?

983


what is a tablespace? : Sql dba

1058


what is sql in mysql? : Sql dba

1199


What does pl sql stand for?

1121


How does cross join work in sql?

1022