How to retrieve first and last records from a table?

Answer Posted / reddy

select*from emp where rowid in (select min(rowid),max(rowid) from emp);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to compare dates in oracle sql?

738


What is the use of file param in imp command?

723


How to define a procedure inside another procedure?

629


How can we find out the current date and time in oracle?

719


Select all the employees who were hired in last 2 years and who works in dept where max managers are working.

2558






How many types of auditing in Oracle?

657


How do I learn what codesets are available in oracle?

658


What is a named program unit?

679


How to use "in" parameter properly?

706


What is the database name in oracle?

637


You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?

1548


What is the difference between a user and a schema in oracle?

659


What is meant by joins?

718


What is a directory object?

691


What are the differences between interval year to month and interval day to second?

639