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
Give the different types of rollback segments.
How to list all tables in your schema?
What is an oracle database table?
When do we use group by clause in a sql query?
What is background process in Oracle?
What are advantages of dateset in datastage?
Why does oracle 9i treat an empty string as null?
State and explain the different types of data models?
What is execute immediate in oracle?
Explain the truncate in oracle?
what happened to the global index when I truncate the data in one of the partition?
What are the predefined tablespaces in a database?
what is the scenario where you take the database to NoArchivelog mode?
Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?
Explain what are clusters?