Hi Everyone,
How to get fist and last record from a table in oracle?
Thanks in advance
Answer Posted / ravi singh
select * from table_name
where rownum = 1
union
select * from table_name
where rownum > (select (count(1) - 1) from table_name);
I think this should work. try
| Is This Answer Correct ? | 3 Yes | 18 No |
Post New Answer View All Answers
How much does sqlite cost?
Is it possible to update views?
What is on delete restrict?
What is the need of a partition key?
what are set operators in sql? : Sql dba
Why do we use joins in sql?
What is a column in a table?
What is sequence in sql?
What is clause?
what tools available for managing mysql server? : Sql dba
What is difference between sql and excel?
Explain correlated query work?
What is meant by cursor in sql?
Why we use join in sql?
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?