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

HI,

Include equal to (=) in that query:

select *
from temp_search
minus (select *
from temp_search
where rownum <= (select count(*) - n from
temp_search))

Another example:

select xx.*
from (select rownum rr, a.* from temp_search a) xx
where xx.rr > (select count(1) - n from temp_search)

*- n : no of last tranactions

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between execution of triggers and stored procedures?

1156


How to return multiple rows from the stored procedure?

1015


How much does a sql dba make? : SQL DBA

989


What are the basic sql commands?

1142


What is a database event trigger?

1211


What are the sql versions?

1000


What is a sql statement?

1018


Can we use views in stored procedure?

1085


how to extract a unit value from a date and time? : Sql dba

1040


Explain sql data types?

1145


Why primary key is required?

1044


What do you think about pl/sql?

1125


What is a database trigger?

1136


How do I view an execution plan in sql?

1035


Does sqlite need a server?

1097