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 / mohammed shahid

select distinct TOP3 from emp order by rownum desc;

Is This Answer Correct ?    2 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the command used to fetch first 5 characters of the string? : Sql dba

1611


How many joins can you have in sql?

898


Could you please provide oca (oracle 10g) dumps for my certification ?

5102


What is error ora-12154: tns:could not resolve the connect identifier specified?

1036


What are the datatypes available in pl/sql ?

1065


What is java sql drivermanager?

1045


how tsql statements can be written and submitted to the database engine? : Transact sql

951


What is the difference between row level and statement level trigger?

983


How many tables can a sql database have?

942


what are the advantages of mysql in comparison to oracle? : Sql dba

954


What is structural independence and why is it important?

997


What is a dirty read sql?

1074


Does view contain data?

997


What are the various restrictions imposed on view in terms of dml?

938


Why plvtab is considered as the easiest way to access the pl/sql table?

1164