I want to know last five transactions or records from emp
table, from now?

Answer Posted / sidhu

For ex: emp table, we want last five transaction in emp

select * from emp
minus
select * from emp where rownum <= (select count(*)-&n from emp);

this will work and give the value 5 it will return last five transacitons.
hope this helpful

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is faster count (*) or count 1?

535


Who is the owner of mysql database?

549


Define commit?

546


What is trigger in sql? Explain

532


how to enter characters as hex numbers? : Sql dba

565






what are the types of join and explain each? : Sql dba

528


What is db journal file?

516


What is the purpose of my sql?

505


Explain the the update statement in sql?

566


Do we need to rebuild index after truncate?

522


GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?

2567


Why do we use partitions in sql?

543


What are joins in sql?

533


What is the difference between left and left outer join?

512


how to convert character strings to numeric values? : Sql dba

572