Тёмный
No video :(

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

Manish Sharma
Подписаться 113 тыс.
Просмотров 110 тыс.
50% 1

Learn how to make a synchronized backup copy of a table using DML Trigger in oracle database by Manish sharma RebellionRider
------------------------------------------------------------------------
►►►LINKS◄◄◄
Blog : www.rebellionr...
Previous Tutorial
► Giveaway announcement
• Video
►Table Auditing using DML trigger
• PL/SQL tutorial 16: Ta...
►Learn copy table with or without data using Create Table As
bit.ly/create-t...
-------------------------------------------------------------------------
►►►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
/ rebellionrider
/ imthebhardwaj
/ rebellionrider
plus.google.co...
/ mannbhardwaj
/ rebellionrider
/ rebellionrider
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 RebellionRider.com
♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS

Опубликовано:

 

6 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 49   
@shreeratan567
@shreeratan567 6 лет назад
bro code is perfect and i'm in love with your explaination.you are G.O.A.T!!
@javaandroid6964
@javaandroid6964 6 лет назад
Great explanation , why these channels have less views and likes
@armanalirahul
@armanalirahul Год назад
can you plz tell me why we use where expression? ( WHERE 1 = 2) in this query --> CREATE TABLE superheroes_backup AS SELECT * FROM superheroes WHERE 1=2;
@arungupta5528
@arungupta5528 4 года назад
Nice video bro.. thanks for sharing your knowledge
@khyatiist
@khyatiist 4 года назад
Awesome explanation Manish. Thanks for sharing. Please tell me what does 1=2 in the where clause mean? Sorry if that's basic but I have never used it.
@Rebellionrider
@Rebellionrider 4 года назад
Thank you so much. I am glad that you liked my video. Your appreciation means a lot to me. Regarding 1=2, it is an always false condition, like 0>1 or True = False.
@khyatiist
@khyatiist 4 года назад
@@Rebellionrider You deserve the appreciation Manish. Thanks for your prompt response. If it is a false condition then why is a where clause even needed?
@achillles6838
@achillles6838 4 года назад
@@khyatiist it is used just to copy the structure of the table not the data. if you you want to copy the data and structure both then 1=1 is used.
@amanmishra529
@amanmishra529 7 лет назад
hats off guruji :)
@CidaLunacorteecostura
@CidaLunacorteecostura 6 лет назад
I liked this video and your explanation. Thank you!
@sahilehsan5728
@sahilehsan5728 4 года назад
I had observe some cases. This trigger query is ok and will work absolutly with single column. But what about if I am having more than 50 columns in a table. How we can write update statement for that? Can you share me script as well for the above query.
@abdihakimmohamed6309
@abdihakimmohamed6309 4 года назад
Thank you Manish for the tutorial. Whenever I use the pseudo record :NEW or even :OLD I get an error I don't know why. I had to even copy the code from your blog but still throwing an error. I am using Oracle12c. There is a red line below the pseudo record. Help !!!!!!!!!!!
@thulasireddy4514
@thulasireddy4514 Год назад
What is the difference between before and after
@ManojYadav-lc3by
@ManojYadav-lc3by 7 лет назад
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?
@aviksengupta4879
@aviksengupta4879 5 лет назад
can you please provide me a query? I have inserted one row values in a backup table, create TABLE_BK as select * from TABLE where DOC_ID = ABC; now I deleted DOC_ID = ABC from TABLE, now I need to insert all the values of row where DOC_ID = ABS from TABLW_BK to main TABLE.
@harshjain1207
@harshjain1207 7 лет назад
What does 1=2 means?? is 1 means table 1 and 2 means table 2???
@SergeantTrigger
@SergeantTrigger 7 лет назад
it's a common statement/condition if u intend to duplicate a table but not copying it's content. 1=2 is false
@Faizyxyz
@Faizyxyz 7 лет назад
where 1=2 mean just creating the table with the same structure with out copying the data.
@ahosanhabib9399
@ahosanhabib9399 4 года назад
faiza and sabillena, thank you :)
@shikharchaudhary6984
@shikharchaudhary6984 6 лет назад
in oracle isql plus this is coming for same code , Warning: Trigger created with compilation errors . What to do ?
@anushat2597
@anushat2597 3 года назад
How to get a copy of table along with constraints and indexes
@tarunsmdtp
@tarunsmdtp 3 года назад
can we backup the data from one DB to another DB as well?
@davidmakinde4291
@davidmakinde4291 4 года назад
wonderful explanation. But i ran the same code and it compiles. But when i update or insert into the table, it tells me trigger compilation or authorisation error. Don't know why?
@Rebellionrider
@Rebellionrider 4 года назад
Make sure the user through which you executing the trigger have all the necessary privileges for running it.
@enriqueruiz3904
@enriqueruiz3904 7 лет назад
Thanks for your time!!
@rahulkumarprasad7803
@rahulkumarprasad7803 4 года назад
Hi Manish, I really respect your hard word and thank you once again that makes us to understand your videos. But I have a doubt . As you explain in this video that we can create synchronized backup copy of a table but what is the use of this back up table. I mean if we delete one record from main table , it will reflect in back up table too so could you please clear my doubt ??please any one ?
@phuoccao4951
@phuoccao4951 4 года назад
same thoughts!
@poojatr897
@poojatr897 Год назад
Yes if we make any changes (insert/delete/update) in main table then obviously it reflects on backup table as we created backup table with condition 1=2. I hope you understood 😊
@Faizyxyz
@Faizyxyz 7 лет назад
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)
@pranaytanniru7764
@pranaytanniru7764 5 лет назад
here it's optional, you can specify the column names while inserting in case if you are not inserting the data in the order of table columns or you want to insert data for only few columns.
@vikram4755
@vikram4755 8 лет назад
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!
@Bhuvana9828
@Bhuvana9828 Год назад
We have to run commit command.
@CyberAZT
@CyberAZT 8 лет назад
Thanks
@bdub229
@bdub229 6 лет назад
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? Thanks Bdub
@pranaytanniru7764
@pranaytanniru7764 5 лет назад
UPDATE table-name SET column-name = value, column-name = value, ... WHERE condition You can use this to update multiple columns
@rameshas7184
@rameshas7184 4 года назад
How to achieve this in oracle form plsql trigger
@krishnasingh-ob6ob
@krishnasingh-ob6ob 4 года назад
ORA-04079: invalid trigger specification give error all time
@parag4982
@parag4982 3 года назад
What us the purpose of 1=2?
@zhengkeongng2892
@zhengkeongng2892 4 года назад
What does "where 1=2" means?
@Rebellionrider
@Rebellionrider 4 года назад
It means "Always Not Equal". 1 will never be equal to 2. If you want you can also use 0=1 or 2 =9 whatever you feel comfortable with.
@sameer26121980
@sameer26121980 7 лет назад
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?
@rajanbansal1355
@rajanbansal1355 7 лет назад
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
@codingwithtoaster8690
@codingwithtoaster8690 5 лет назад
They are predefined predicates in the oracle database. He talked about it in previous videos.
@rahulkumarprasad7803
@rahulkumarprasad7803 4 года назад
Inserting is a keyword in Oracle.
@rahulkumarprasad7803
@rahulkumarprasad7803 4 года назад
Hey Manish .. I know you have a comment notification regarding this video .Please reply me the same.
@Prasadd11
@Prasadd11 4 месяца назад
what if i do delete from superheroes; update superheroes set sh_name='Ironman'; this trigger will not make a copy of the original table to backup table
@marketingpaathshala3126
@marketingpaathshala3126 6 лет назад
what does this DESC means ?
@codingwithtoaster8690
@codingwithtoaster8690 5 лет назад
describe
@gulzarsiddique8908
@gulzarsiddique8908 8 лет назад
can we use multiple columns in this program for backup ???
Далее
Modus males sekolah
00:14
Просмотров 9 млн
НЕДОВОЛЬНА УСЛУГОЙ #shorts
00:27
Просмотров 21 тыс.
7 Database Design Mistakes to Avoid (With Solutions)
11:29
I've been using Redis wrong this whole time...
20:53
Просмотров 356 тыс.
SQL vs. NoSQL: What's the difference?
6:06
Просмотров 144 тыс.
Learning MySQL - TRIGGERS
9:51
Просмотров 98 тыс.
Modus males sekolah
00:14
Просмотров 9 млн