Hi Everyone,
How to get fist and last record from a table in oracle?
Thanks in advance
Answer Posted / venkyhulk1
select *
from (select rownum r, e.* from emp e)
where r in ((select max(rownum) from (select rownum , e.*
from emp e)),(select min(rownum) from (select rownum , e.*
from emp e)))
this querry will get the first and last records of the table
with respect to the way the data is stored in the table
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is null in pl/sql?
how do you tune the slow running queries in oracle db , explain the methodology
Explain what is a column in a table?
what are date and time intervals? : Sql dba
What is cold data?
What are the different type of joins in sql?
What is union and union all keyword in sql and what are their differences?
Is sql free?
How do you create a unique index?
What are different types of queries in sql?
How many columns should be in an index?
How to add new employee details in an employee_details table with the following details
What is a subquery in sql?
What are the different types of joins in sql?
What is the use of & in pl sql?