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 sql query is executed?
Can 2 queries be executed simultaneously in a distributed database system?
How to Execute a Package in PL/SQL.?
What is partition by in sql?
How delete all data from all tables in sql?
What are commit, rollback, and savepoint?
Mention what pl/sql package consists of?
What is difference between db2 and sql?
How many types of literals are available in pl sql?
Why join is faster than subquery?
Enlist some predefined exceptions?
How do I add a primary key to a table?
i have some prob lem to tell me about my self in interview first round ...
Why stored procedure is faster than query?
Why use stored procedures?