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
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?
what are the disadvantages of mysql? : Sql dba
What is the purpose of the partition table?
How to run sql statements with oracle sql developer?
Can instead of triggers be used to fire once for each statement on a view?
What is the difference between function, procedure and package in pl/sql?
What are different sql data types?
how to convert numeric values to character strings? : Sql dba
Explain how exception handling is done in advance pl/sql?
what is recursive stored procedure? : Sql dba
What are variables in pl sql?
What is the difference between view and stored procedure?
what is the difference between sql and t-sql? : Transact sql
Is it important to partition hard disk?
what are the authentication modes in sql server? How can it be changed? : Sql dba