bro code is perfect and i'm in love with your explaination.you are G.O.A.T!!
@arungupta55284 жыл бұрын
Nice video bro.. thanks for sharing your knowledge
@CidaLunacorteecostura7 жыл бұрын
I liked this video and your explanation. Thank you!
@khyatiist4 жыл бұрын
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.
@Rebellionrider4 жыл бұрын
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.
@khyatiist4 жыл бұрын
@@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?
@achillles68384 жыл бұрын
@@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.
@amanmishra5297 жыл бұрын
hats off guruji :)
@javaandroid69646 жыл бұрын
Great explanation , why these channels have less views and likes
@abdihakimmohamed63094 жыл бұрын
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 !!!!!!!!!!!
@sahilehsan57285 жыл бұрын
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.
@aviksengupta48795 жыл бұрын
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.
@ManojYadav-lc3by8 жыл бұрын
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?
@armanalirahul2 жыл бұрын
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;
@rahulkumarprasad78034 жыл бұрын
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 ?
@phuoccao49514 жыл бұрын
same thoughts!
@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 😊
@enriqueruiz39047 жыл бұрын
Thanks for your time!!
@bdub2297 жыл бұрын
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
@pranaytanniru77646 жыл бұрын
UPDATE table-name SET column-name = value, column-name = value, ... WHERE condition You can use this to update multiple columns
@Faizyxyz8 жыл бұрын
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)
@pranaytanniru77646 жыл бұрын
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.
@gulzarsiddique89088 жыл бұрын
can we use multiple columns in this program for backup ???
@thulasireddy4514 Жыл бұрын
What is the difference between before and after
@davidmakinde42914 жыл бұрын
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?
@Rebellionrider4 жыл бұрын
Make sure the user through which you executing the trigger have all the necessary privileges for running it.
@vikram47558 жыл бұрын
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 Жыл бұрын
We have to run commit command.
@shikharchaudhary69847 жыл бұрын
in oracle isql plus this is coming for same code , Warning: Trigger created with compilation errors . What to do ?
@harshjain12078 жыл бұрын
What does 1=2 means?? is 1 means table 1 and 2 means table 2???
@SergeantTrigger8 жыл бұрын
it's a common statement/condition if u intend to duplicate a table but not copying it's content. 1=2 is false
@Faizyxyz8 жыл бұрын
where 1=2 mean just creating the table with the same structure with out copying the data.
@ahosanhabib93995 жыл бұрын
faiza and sabillena, thank you :)
@anushat25973 жыл бұрын
How to get a copy of table along with constraints and indexes
@CyberAZT9 жыл бұрын
Thanks
@rameshas71844 жыл бұрын
How to achieve this in oracle form plsql trigger
@krishnasingh-ob6ob4 жыл бұрын
ORA-04079: invalid trigger specification give error all time
@parag49824 жыл бұрын
What us the purpose of 1=2?
@sameer261219807 жыл бұрын
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?
@rajanbansal13557 жыл бұрын
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
@codingwithtoaster86906 жыл бұрын
They are predefined predicates in the oracle database. He talked about it in previous videos.
@rahulkumarprasad78034 жыл бұрын
Inserting is a keyword in Oracle.
@zhengkeongng28924 жыл бұрын
What does "where 1=2" means?
@Rebellionrider4 жыл бұрын
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.
@rahulkumarprasad78034 жыл бұрын
Hey Manish .. I know you have a comment notification regarding this video .Please reply me the same.
@Prasadd119 ай бұрын
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
@marketingpaathshala31266 жыл бұрын
what does this DESC means ?
@codingwithtoaster86906 жыл бұрын
describe
@tarunsmdtp4 жыл бұрын
can we backup the data from one DB to another DB as well?