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

What is sql select statement?

1017


What is normalisation and its types?

990


What is meant by truncate in sql?

1049


Is left join faster than join?

1039


Can you join a table to itself?

1110


What is sql exception?

953


What is varchar sql?

1120


What are different types of sql commands?

1097


Is not equal in sql?

1000


How many aggregate functions are available there in sql?

970


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

1096


What is compute?

1076


What is a database? Explain

1099


Is time a data type in sql?

890


Is id a reserved word in sql?

1135