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

Differentiate pl/sql and sql?

741


What are the types of records?

741


What is an index? What are the types of indexes? How many clustered indexes can be created on a table?

720


What packages are available to pl/sql developers?

811


What is set serveroutput on in pl sql?

810






What are the disadvantages of not performing database normalization?

806


How can I get the number of records affected by a stored procedure?

767


What is full form of rtm?

721


What is sqlite format?

812


How to connect a sql*plus session to an oracle server?

819


When is a declare statement required?

867


How much ram can sql express use?

699


tell us something about heap tables. : Sql dba

819


What is the use of sql trace?

671


What are database links used for?

751