Hi Everyone,
How to get fist and last record from a table in oracle?

Thanks in advance

Answer Posted / gourav

select * from emp(table name)
where rownum = 1 and 30



this query will display the first and last record


for eg rownum start from 1 and rownum last record is 30..by
execute this query u wil get frst and last reord

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is on delete set null?

574


Does truncate table reset auto increment?

538


how many groups of data types? : Sql dba

578


What is a behavioral trigger?

523


What are secondary keys?

575






What are the types of join and explain each?

594


How do I view a sql trace file?

575


What is pragma in pl sql?

609


how many tables will create when we create table, what are they? : Sql dba

551


Can you select everything, but 1 or 2 fields, without writer's cramp?

508


What is a dynamic query?

583


what is an alias command? : Sql dba

556


How can you load microsoft excel data into oracle? : aql loader

623


what are the performance and scalability characteristics of mysql? : Sql dba

542


How do you delete duplicates in sql query using rowid?

549