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 I view a view in sql?

890


What is the process of copying data from table a to table b?

1037


What is prepared statement in sql?

998


Mention what are the benefits of pl/sql packages?

1001


Can a commit statement be executed as part of a trigger?

998


What are procedures used for?

924


Mention what is the use of function "module procedure" in pl/sql?

1009


What is bind variable in pl sql?

980


what is acid property in database? : Sql dba

962


Which constraints we can use while creating database in sql?

1018


what is clause? : Sql dba

1006


What is the difference between nested table and varray?

944


Why query optimization is needed?

865


Why do we use sql constraints? Which constraints we can use while creating database in sql?

974


How many types of triggers exist in pl/sql?

1011