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 you write a subquery?
What is the use of pl/sql table?
Is inner join same as self join?
How many types of triggers exist in pl/sql?
Which is faster view or stored procedure?
How do I run a query in pl sql developer?
How delete all data from all tables in sql?
What is Materialized View? In What Scenario we Use Materialized View?
What are aggregate and scalar functions?
What is foreign key in sql with example?
how can we destroy the cookie? : Sql dba
Explain what is a column in a table?
What are the limitations of sql express?
What is the use of function "module procedure" in pl/sql?
What are the benefits of pl sql?