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 / pavithra

select * from emp where rowid in(select rowid from emp
where rownum<=&upto minus select rowid from emp where
rownum<&start)

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are predefined functions in sql?

976


How can we implement rollback or commit statement in a trigger?

974


What is primary key sql?

947


What are the two characteristics of a primary key?

924


how to use case expression? : Sql dba

957


What is scalar function in sql?

973


Why is stored procedure faster than query?

906


What is break?

1138


what are the drivers in mysql? : Sql dba

981


Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

1111


What is normalization in a database?

1104


What is the file extension for sql database?

935


What does partition by mean in sql?

904


what is union? : Sql dba

962


Does view contain data?

978