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
How do I view a view in sql?
What is the process of copying data from table a to table b?
What is prepared statement in sql?
Mention what are the benefits of pl/sql packages?
Can a commit statement be executed as part of a trigger?
What are procedures used for?
Mention what is the use of function "module procedure" in pl/sql?
What is bind variable in pl sql?
what is acid property in database? : Sql dba
Which constraints we can use while creating database in sql?
what is clause? : Sql dba
What is the difference between nested table and varray?
Why query optimization is needed?
Why do we use sql constraints? Which constraints we can use while creating database in sql?
How many types of triggers exist in pl/sql?