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
Does truncate remove indexes?
What are the different dml commands in sql?
What is the difference between inner join and natural join?
how can you create an empty table from an existing table? : Sql dba
What is count * in sql?
what is sql? : Sql dba
Difference between table function and pipelined function?
what is the difference between nested subquery and correlated subquery?
how to include numeric values in sql statements? : Sql dba
What is record type in pl sql?
What are character functions in sql?
How can I speed up sql query?
Describe different types of general function used in sql?
how to load data files into tables with 'mysqlimport'? : Sql dba
How do I run a sql query in pgadmin 4?