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
How to run sql functions in pl/sql?
Can one improve the performance of sql*loader? : aql loader
explain advantages of myisam over innodb? : Sql dba
What is cursor in pl sql with examples?
Can we use ddl statements in stored procedure sql server?
What is a dynamic query?
What are sql indexes?
how to use myisamchk to check or repair myisam tables? : Sql dba
what are wild cards used in database for pattern matching ? : Sql dba
What is delimiter in pl sql?
Why truncate is used in sql?
What is a function in oracle pl sql?
how to enter numeric values as hex numbers? : Sql dba
Which normal form is best?
What is difference between hql and native sql?