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 a sql schema used for?

1100


what is an extent ? : Sql dba

1099


Is it mandatory for the primary key to be given a value when a new record is inserted?

1198


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

965


Is ms sql traffic encrypted?

922


What is scope of pl sql developer in future?

1018


Can a table have no primary key?

1061


Why truncate is faster than delete?

1109


What are character functions?

1087


What are the conditions an underlying table must satisfy before a cursor can be used by a positioned update or delete statement? : Transact sql

1001


Explain lock escalation? : Transact sql

1195


what is a constraint? Tell me about its various levels. : Sql dba

985


How to create your own reports in sql developer?

1017


How many types of functions are there in sql?

953


What is PL/SQL Records?

1189