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

Answer Posted / nathan

SELECT *
FROM (SELECT emp.*, ROWNUM rn
FROM emp)
WHERE rn = 1 OR rn = (SELECT COUNT (*)
FROM emp);

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is oracle data type?

546


What is a parameter file in oracle?

550


How to lock and unlock a user account in oracle?

606


How to retrieve values from data fields in record variables?

557


What language does oracle use?

589






What is Virtual Private Database in Oracle?

608


What are the arithmetic operations?

574


How to install oracle database 10g xe?

556


What is tns entry?

615


What is data type in oracle?

556


20. Using a set operator, display the client number of all clients who have never placed an order.

1793


How to create a testing table in oracle?

536


How do I escape a reserved word in oracle?

622


How to apply filtering criteria at group level in oracle?

577


What is an oracle user role?

559