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

Can we create a trigger on view?

882


what's the difference between a primary key and a unique key? : Sql dba

1031


Are sql connections encrypted?

999


What is full join in sql?

973


What is the use of non clustered index?

977


How many types of cursors supported in pl/sql?

1159


How can I delete duplicate rows?

995


what is sub-query? : Transact sql

1084


what is a view? : Sql dba

1066


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2002


How do I tune a sql query?

959


What is pl sql script?

1011


What is an exception in PL/SQL? What are the two types of exceptions?

1278


What is pls_integer in pl sql?

1074


What is the difference between cross join and natural join?

999