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
What is the difference between execution of triggers and stored procedures?
How to return multiple rows from the stored procedure?
How much does a sql dba make? : SQL DBA
What are the basic sql commands?
What is a database event trigger?
What are the sql versions?
What is a sql statement?
Can we use views in stored procedure?
how to extract a unit value from a date and time? : Sql dba
Explain sql data types?
Why primary key is required?
What do you think about pl/sql?
What is a database trigger?
How do I view an execution plan in sql?
Does sqlite need a server?