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 instant client oracle?

756


What is an oracle?

736


How do you find out from the RMAN catalog if a particular archive log has been backed-up?

1850


What is a table index in oracle?

825


What is meant by joins? List out the types of joins.

700






What is oracle used for?

729


22. Display the order number, number of lines in the order, total number of items and total value for all orders that have a total value greater than $100

1759


What is the difference between post-database commit and post-form commit?

772


How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?

1668


How to use subqueries with the in operator using oracle?

800


What is the Tune Query

2045


How to retrieve values from data fields in record variables?

762


How to use like conditions in oracle?

766


How to initialize variables with default values?

834


Is oracle an open source?

786