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 are the types of optimization?

961


What does count (*) mean in sql?

1589


How do sql databases work?

1002


What is the importance of sqlcode and sqlerrm?

1356


What is the difference between instead of trigger and after trigger?

1011


What are the types of variables use in pl sql?

1044


How does rowid help in running a query faster?

1416


What is union and union all keyword in sql and what are their differences?

1108


What do we need to check in database testing?

1018


What will you get by the cursor attribute sql%found?

964


define data blocks ? : Sql dba

1000


What does plv msg allows you to do?

1142


How does a covering index work?

962


How to run sql*plus commands in sql developer?

1159


what does the t-sql command ident_current does? : Transact sql

982