Hi Everyone,
How to get fist and last record from a table in oracle?
Thanks in advance
Answer Posted / ashwani kumar singh
SELECT * FROM EMP WHERE ROWNUM < 2
UNION
SELECT * FROM (SELECT * FROM EMP ORDER BY EMPNO DESC )
WHERE ROWNUM < 2
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
How does a self join work?
How do you go back in sql?
What are the different types of functions in sql?
how can we know the number of days between two given dates using mysql? : Sql dba
How can a pl sql block be executed?
What is compilation error in pl sql?
How do I create a sql script?
What can you do with pl sql?
What is sql engine in oracle?
What is the left table in sql?
Why left join is used in sql?
what is a tablespace? : Sql dba
what is sql in mysql? : Sql dba
What does pl sql stand for?
How does cross join work in sql?