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...

how to retrieve 1st and last row of table without using
group functions??

Answer Posted / rajesh

SELECT * FROM (SELECT * FROM EMP ORDER BY EMP_NO) WHERE
ROWNUM < 2

UNION

SELECT * FROM (SELECT * FROM EMP ORDER BY EMP_NO DESC)
WHERE ROWNUM < 2;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to start instance with a minimal initialization parameter file?

992


Why does Oracle not permit the use of PCTUSED with indexes?

2368


HI Friends Myself Manoj,i am from bengaluru.i have 1 yr of exp in PLSQL but not upto the mark..now attending interviews but m not able to clear even 1 round..i have attended 3 interviews till today.purpose of writing this query is,i want to know the intreview topics that interviewer going to ask frequently,mainly SCENARIO based questions.IF anybody have any PLSQL projects please give it to me,it will helps me alot.Thanks for your patience.

1368


How to insert a record into a table?

1022


how do we code triggers , store procedure , Performance tuning and indexing in a Java Project? Pls kindly get me the perfect answer with the code for each....thank you in advance............pls any body kindly help me soon as possible....

2004


What is sharded cluster?

926


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

2902


What's dateware house and what's clustor with practicle example

2128


Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?

2302


What are the set operators union, union all, minus & intersect meant to do?

939


How to create a single index for multiple columns?

980


How to create id with auto_increment on oracle?

935


What is the maximum number of triggers that can be applied to a single table?

956


What is private procedure oracle?

958


What is the usage of synonyms?

1062