how to retrieve 1st and last row of table without using
group functions??

Answer Posted / sudipta santra

For the 1st row:

select * from emp where rownum<2 order by empno;

For the last row:

select * from emp where rownum<2 order by empno desc;

Is This Answer Correct ?    14 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the disadvantage of User defind function?

1828


Is it possible to insert comments into sql statements return in the data model editor ?

2061


What is a trigger oracle?

553


How to fetch the row which has the max value for a column?

531


How to best split csv strings in oracle 9i?

576






How to test null values?

668


What is oracle analytical function?

520


What are the differences between blob and clob in oracle?

576


What is flashback in Oracle?

576


What is sharded cluster?

515


How to retrieve data from an cursor to a record?

559


How to list all indexes in your schema?

572


How to establish administrator authentication to the server?

550


How to create a new user account in oracle?

568


What is a system tablespace?

588