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 can we optimize a sql query?
Can we create a trigger on view?
what is a foreign key ? : Sql dba
What is a sql select statement?
Differentiate between sga and pga.
What is difference between inner join and self join?
What is sql select statement?
What is the use of count (*) in sql?
How many row comparison operators are used while working with a subquery?
What is procedure and function in sql?
Is crud a cuss word?
Which is faster count (*) or count 1?
Can we create index on primary key?
What is nosql db?
What are string functions in sql?