PL/SQL tutorial 17: Make synchronized backup copy of a table using DML Trigger

Learn how to make a synchronized backup copy of a table using DML Trigger in oracle database by Manish sharma RebellionRider
Blog :
Previous Tutorial
► Giveaway announcement

►Table Auditing using DML trigger

►Learn copy table with or without data using Create Table As

►►►Let’s Get Free Uber Cab◄◄◄
Use Referral Code UberRebellionRider and get $20 free for your first ride.

►Make sure you SUBSCRIBE and be the 1st one to see my videos!
►►►Find me on Social Media◄◄◄
Follow What I am up to as it happens on

You can also Email me at
for E-mail address please check About section

Please please LIKE and SHARE my videos it makes me happy.
Thanks for liking, commenting, sharing and watching more of our videos

This is Manish from


Gulzar siddique says:

can we use multiple columns in this program for backup ???

Marketing Paathshala says:

what does this DESC means ?

Enrique ruiz says:

Thanks for your time!!

shree ratan says:

bro code is perfect and i’m in love with your are G.O.A.T!!

aman mishra says:

hats off guruji 🙂

Cida Luna says:

I liked this video and your explanation. Thank you!

Bdub says:

Hi Great videos. I do have a question,

Can you have multiple “SET column =:new.column WHERE column =:old.column;” in an ELSIF statement. I have created a movies table and if i wanted to update a certain column can this be done with “SET column =:new.column WHERE column =:old.column;” statement or is this something more advanced in some of your later tutorials?


Mohd Faizan says:

Hi Manish Sir,
I just want to know in this query INSERT INTO superheroes_backup (SH_NAME) VALUES (:NEW.SH_NAME);
you have given superheroes_backup table name then after (SH_NAME) why so i am confused here why have you given this (SH_NAME)

Harsh Jain says:

What does 1=2 means?? is 1 means table 1 and 2 means table 2???

Sameer D says:

Thanks for the explanation.
What is the difference between BEFORE and AFTER?
I tried creating a trigger with BEFORE.
I made changes to the superheroes table..
alter table superheroes modify (sh_name integer);
insert into superheroes (sh_name) values (‘batman’);
The main insert failed (as expected), but I did not see the record inserted into superheroes_bkp table. If the insert into superheroes_bkp table happens BEFORE the main table, then why the record is not visible in superheroes_bkp table?
Or may be my understanding is wrong about BEFORE/AFTER.

Is there a way to capture the insert even if the main insert fails?

Abdualziz Kalufah says:


vikram nagalikar says:

Thanks that nice, but just a question, as you are executing this query in a one session hence you would be able to see insert, update and delete result. But if a user from different session views backup table, that would have nothing, as there is no commit!

Shikhar Chaudhary says:

in oracle isql plus this is coming for same code , Warning: Trigger created with compilation errors . What to do ?

Rajan Bansal says:

want to know that we are writing keyword inserting deleting updating
whether it is ok writing ing with insert delete update
how system know that inserting means insert

Shadab Zakaria says:

Great explanation , why these channels have less views and likes

Manoj Yadav says:

i need to create a backup copy of same table in different database and that should be updated when primary table is getting updated. is this possible with this trigger?

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!