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...

I want to know last five transactions or records from emp
table, from now?

Answer Posted / sidhu

For ex: emp table, we want last five transaction in emp

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

this will work and give the value 5 it will return last five transacitons.
hope this helpful

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does (+) mean in sql joins?

1045


explain normalization concept? : Sql dba

1030


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

1128


Why self join is used in sql?

962


How do I partition a table in sql?

1100


Can we use join in subquery?

1073


what are set operators in sql? : Sql dba

1022


how would you enter characters as hex numbers? : Sql dba

968


what is the difference between union and union all? : Sql dba

1001


Explain two easy sql optimizations.

994


explain the options of myisamchk to improve the performance of a table. : Sql dba

992


What are the built in functions of sql?

1012


How can you know that statistics should be updated?

1063


Can sql developer connect to db2?

1012


How do I run a sql trace?

946