how to retrieve 1st and last row of table without using
group functions??
Answer Posted / prabhudatta
SELECT * FROM (SELECT * FROM EMP ORDER BY EMP_NO) WHERE
ROWNUM=1
UNION
SELECT * FROM (SELECT * FROM EMP ORDER BY EMP_NO DESC)
WHERE ROWNUM=1;
Is This Answer Correct ? | 14 Yes | 4 No |
Post New Answer View All Answers
Explain the different normalization forms?
How to revoke create session privilege from a user in oracle?
what happened to the global index when I truncate the data in one of the partition?
What are oracle functions?
What is tns name?
How to use subqueries with the in operator using oracle?
How to add another datafile to a tablespace?
What is a subquery in oracle?
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 run queries on external tables?
What is the difference between $oracle_base and $oracle_home?
Why is oracle used?
How many categories of data types?
How to do paging with oracle?
How can I see all tables in oracle?