Hi Everyone,
How to get fist and last record from a table in oracle?
Thanks in advance
Answer Posted / rajesh venati
this will also work
select * from table_name where rowid=(select min(rowid) from
table_name)
union
select * from table_name where rowid=(select max(rowid) from
table_name);
| Is This Answer Correct ? | 23 Yes | 2 No |
Post New Answer View All Answers
What is the difference between sql and isql*plus?
How much does sql cost?
How do you define a foreign key?
Why we use pl sql?
What are the different schemas objects that can be created using pl/sql?
what happens if null values are involved in expressions? : Sql dba
In what condition is it good to disable a trigger?
What are system versioned tables?
Can we rename a column in the output of sql query?
How many types of functions are there in sql?
How do I create a sql script?
What is AUTH_ID and AUTH_USER in pl/sql ?
What is difference between pls_integer and integer?
Show the cursor attributes of pl/sql.
Why do we use cursors?