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
what is sql? : Sql dba
Can you have more than one key in a database?
What is sql engine in oracle?
Is id a reserved word in sql?
Which language is used in sql?
What is a parameter query?
What is dml with example?
how to calculate expressions with sql statements? : Sql dba
what is error ora-03113: end-of-file on communication channel?
What is rank () in sql?
Write the alter statement to enable all the triggers on the t.students table.
How do you know if a relationship is 2nf?
what is cross join? : Sql dba
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
Why do we use cursors?