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 / alok narayan

select * from (select * from emp order by rowid desc )
where rownum <= 3 order by rowid;

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you update f as m and m as f from the below table testtable?

1859


What is a table?

1016


What is 19 null in sql?

968


Define sql delete statement.

1016


What is update query?

984


What are the differences between in and exists clause?

1111


What is the use of function "module procedure" in pl/sql?

1198


Are subqueries faster than joins?

1022


what is the syntax for using sql_variant_property? : Transact sql

1047


What is sql keyword?

1004


What is a sql driver?

1000


Where is pl sql used?

954


What are some predefined exceptions in pl/sql?

1168


Is sql a programming?

978


Cite the differences between execution of triggers and stored procedures?

1078