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 the difference between python and sql?

938


What is input buffer in sql*plus?

1123


what is the difference between primary key and unique key? : Sql dba

969


What is the most important ddl statements in sql are?

946


What are all the different normalizations?

970


what are null values? : Sql dba

900


What is a full join sql?

981


How does join work in sql?

957


What are instead of triggers?

993


What are the two parts of design view?

974


Explain the steps needed to create the scheduled job?

967


What is difference between nchar and nvarchar?

956


What is cursor explain with example?

922


What is the sql query to display the current date?

990


what are the advantages of using stored procedures? : Sql dba

1059