Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to retrieve last tree records from table?
select *from emp where rownum > (select count(*)-3 from
emp);
i am using this query to get last three records from table
but its not giving any output, so please tell me what is the
error in this query.

Answer Posted / pavithra

select * from emp where rowid in(select rowid from emp
where rownum<=&upto minus select rowid from emp where
rownum<&start)

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is uncommittable transactions? : Transact sql

987


Is vs as in pl sql?

971


How can we find duplicate records in a table?

929


Write a sql query to find the names of employees that begin with ‘a’?

992


How does postgresql compare to oracle/db2/ms sql server/informix?

1021


What is cursor status?

1178


What is having clause in sql?

950


what is sql in mysql? : Sql dba

1178


Why is the cursor important?

1025


Can we use pl sql in mysql?

1000


What is the difference between the implicit and explicit cursors?

1035


Mention what is the plv (pl/vision) package offers?

1094


What is oracle pl sql developer?

965


Differentiate pl/sql and sql?

1053


Does view store data in sql?

949