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 / ajit nayak

select *from emp
minus
select *
from emp
where rownum <= (select count(*)-3 from
emp);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is data manipulation language? : Sql dba

1021


What do you understand by exception handling in pl/sql?

1035


Enlist the advantages of sql.

1001


What is dynamic sql in pl sql?

1036


What is the difference between inner join and left join?

989


what is the difference between group by and order by in sql? : Sql dba

1128


what is bcp? When is it used?

1113


What is sql and explain its components?

1067


Can we call procedure in select statement?

1056


What is exception? What are the types of exceptions?

1073


How can a function retun more than one value in oracle with proper example?

1074


what are all different types of collation sensitivity? : Sql dba

982


What is sqlcommand?

1032


what is a database lock ? : Sql dba

1173


What are the different types of a subquery?

1051