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
How many types of tables are there?
What is a common use of group by in sql?
Why is there a need for sqlcode and sqlerrm variables?
Why do we use procedures in pl sql?
What are the operators used in select statements?
What are different types of sql commands?
how to drop an existing index in mysql? : Sql dba
Which table is left in left join?
what is the difference between blob and text? : Sql dba
What is sql entity?
What is the requirement of self-join?
Can we change the table name in sql?
what does the t-sql command ident_current does? : Transact sql
What is the cause of mutating table error and how can we solve it?
Can we create view in stored procedure?