How to retrieve first and last records from a table?

Answer Posted / avnish srivastava-test engg fc

select* from employees where rowid=(select min(rowid) from
employees)
union
select* from employees where rowid=(select max(rowid) from
employees)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I know if oracle client is installed on windows?

498


How do I find my oracle client driver version?

528


What is user managed backup in Oracle?

615


How to rename an index in oracle?

619


How to display row numbers with the records?

588






Give the different types of rollback segments.

583


Explain about the analyze command in oracle?

591


How to select all columns of all rows from a table in oracle?

590


> CREATE OR REPLACE FUNCTION FACTORIAL_1(factstr varchar2 ) 2 RETURN NUMBER AS 3 new_str VARCHAR2(4000) := factstr||'*' ; 4 fact number := 1 ; 5 BEGIN 6 7 WHILE new_str IS NOT NULL 8 LOOP 9 fact := fact * TO_NUMBER(SUBSTR(new_str,1,INSTR(new_str,'*')-1)); 10 new_str := substr( new_str,INSTR(new_str,'*')+1); 11 END LOOP; 12 13 RETURN fact; 14 15 END; explanation Above program?

1571


How to estimate disk space needed for an export job?

564


Which are the five query types available in oracle?

532


From the following identify the non schema object: packages, triggers, public synonyms, tables and indexes.

593


What is the sid in oracle?

538


How to load data through external tables?

583


What do you understand by database schema and what does it hold?

598