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 we accept inputs from user during runtime?
What is the difference between local and global temporary table?
Mention what are the benefits of pl/sql packages?
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
explain advantages of myisam over innodb? : Sql dba
What is string join?
what is a trigger in mysql? Define different types of trigger. : Sql dba
What is clustered index in sql?
What is %type in sql?
Why join is faster than subquery?
What are all ddl commands?
Is it mandatory for the primary key to be given a value when a new record is inserted?
What is %rowtype in pl sql?
What are the 3 types of behavioral triggers?
How you can copy a file to file content and file to pl/sql table in advance pl/sql?