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
How to start instance with a minimal initialization parameter file?
Why does Oracle not permit the use of PCTUSED with indexes?
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.
How to insert a record into a table?
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....
What is sharded cluster?
Select all the employees who were hired in last 2 years and who works in dept where max managers are working.
What's dateware house and what's clustor with practicle example
Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?
What are the set operators union, union all, minus & intersect meant to do?
How to create a single index for multiple columns?
How to create id with auto_increment on oracle?
What is the maximum number of triggers that can be applied to a single table?
What is private procedure oracle?
What is the usage of synonyms?