How to retrieve first and last records from a table?
Answer Posted / naveen
SELECT * FROM EMP WHERE ROWID IN(SELECT MIN(ROWID) FROM EMP)
UNION ALL
SELECT * FROM EMP WHERE ROWID IN(SELECT MAX(ROWID) FROM EMP);
| Is This Answer Correct ? | 22 Yes | 0 No |
Post New Answer View All Answers
Briefly explain what is literal? Give an example where it can be used?
What is the difference between sharding and partitioning?
Explain the use of rows option in exp command.
What is an oracle function?
How to concatenate two text values in oracle?
Where do you use decode and case statements?
How to recover a dropped table in oracle?
How to best split csv strings in oracle 9i?
Can a formula column referred to columns in higher group ?
How we can able to import our own template (users designed MS-Word templates) which has many tabular columns; need to pass some values generate by Oracle-reports9i? Actually need to import more than 400 MS-Word templates into Oracle Reports-9i to minimize layout design in Reports.
What is raw datatype in oracle?
How can we delete duplicate rows in a table?
Where do we use decode and case statements?
What is the Tune Query
How to convert times to characters in oracle?