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

why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

1044


When do we use triggers?

1027


how can we take a backup of a mysql table and how can we restore it. ? : Sql dba

923


What is an exception in pl/sql?

1009


write an sql query to find names of employee start with 'a'? : Sql dba

967


How do you drop a trigger?

924


Can we insert in sql function?

1027


What is sql architecture?

985


How many joins in sql?

948


What is pl sql package?

993


What is basic structure of pl sql?

990


Why do we need cursor in pl sql?

1080


Can we alter stored procedure?

945


What are different joins used in sql?

1010


What are the three forms of normalization?

996