Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we Get the Updated Rows? ie, There is 100s of Rows i
updated the Rows who have salary 5000. then i want to select
the Updated Rows. How can we achieve it?

Answer Posted / sudipta santra

create table t1 as select * from emp;
truncate table t1;

create or replace trigger tri_t1
before update on emp
for eachrow
begin
insert into t1
values(old.empno,old.ename,old.job,old.hiredate,old.sal,
old.comm,old.deptno);

end;
after create trigger
then if u update then the old updated values will be kept
in t1 table.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do we accept inputs from user during runtime?

1117


What is the difference between local and global temporary table?

1088


Mention what are the benefits of pl/sql packages?

1155


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2610


explain advantages of myisam over innodb? : Sql dba

1111


What is string join?

1024


what is a trigger in mysql? Define different types of trigger. : Sql dba

1113


What is clustered index in sql?

1098


What is %type in sql?

1018


Why join is faster than subquery?

1159


What are all ddl commands?

1127


Is it mandatory for the primary key to be given a value when a new record is inserted?

1252


What is %rowtype in pl sql?

1030


What are the 3 types of behavioral triggers?

1312


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

1185