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 are data types in pl sql?
what is the difference between inner and outer join? Explain with example. : Sql dba
Can we debug stored procedure?
Explain polymorphism in pl/sql.
List the different type of joins?
What is the difference between left and left outer join?
How do I add a database to sql?
Why partition by is used in sql?
What is indexing in sql and its types?
What does <> sql mean?
name 3 ways to get an accurate count of the number of records in a table? : Sql dba
Do ddl statements need commit?
What is auto increment feature in sql?
How to load data with sql*loader?
Which is faster subquery or join?