Hey Alex, just wanted to say I’ve been following your projects and followed your videos on how to build your resume, and was blessed to receive a job offer because of you. Thank you for everything.
🎯 Key Takeaways for quick navigation: 00:00 *📝 Introduction to Triggers in MySQL* - Triggers in MySQL automatically execute code when specific events occur on a table. - Triggers are useful for maintaining data consistency and automating tasks based on data changes. - A trigger consists of a name, event, and action to perform after the event. 03:26 *🔧 Creating a Trigger in MySQL* - Delimiters in MySQL are essential for handling multi-line queries, allowing multiple statements within a single query. - Triggers are defined using the `CREATE TRIGGER` statement with specific event conditions. - Triggers can be set to execute before or after an event, such as insertion, deletion, or update. 08:50 *🔄 Testing and Utilizing Triggers* - Triggers provide a mechanism for automating tasks, such as updating related tables when data changes occur. - Testing triggers involves inserting data to observe trigger behavior and ensure proper functionality. - Triggers save time and effort in maintaining data integrity and consistency in real-world database operations. 09:04 *🗓️ Introduction to Events in MySQL* - Events in MySQL are scheduled tasks that can be executed at specified intervals. - Unlike triggers, events are not triggered by data changes but are executed according to a predefined schedule. - Events are beneficial for automating recurring tasks such as data imports, exports, or cleanup operations. 11:08 *⏰ Creating Scheduled Events in MySQL* - MySQL events are created using the `CREATE EVENT` statement, specifying the schedule and actions to be performed. - Scheduled events can execute SQL statements, allowing for data manipulation, cleanup, or reporting tasks. - Events provide a convenient way to automate routine database maintenance and management tasks. 13:52 *🔍 Testing and Troubleshooting MySQL Events* - Testing MySQL events involves verifying their execution according to the defined schedule and expected actions. - Troubleshooting event creation issues may require checking the status of the event scheduler and adjusting user permissions. - Understanding the nuances of event scheduling ensures effective automation of database tasks while minimizing errors. Made with HARPA AI
Hey Alex, I wanted to thank you for this bootcamp. It's so kind of you to offer these treasures for free. You've made becoming a DA even easier and less daunting. Thank you!
Hey Alex, thanks for this series on MySQL. The way you explain things is so dynamic and clear, you really do a great work! Also, your examples with The Office and Parks and Recs characters are simply fantastic. We have fun while learning and this is amazing. Thanks for all that !
hey alex recently found your channel and has followed through this series had amazing chance to learn new things and clear out the previous topics thanx for this bootcamp
I am having a great time learning with your series for MySQL which I did not even learn in my Coursera course ! Everything is explained in a simple way to understand. I plan to finish the bootcamp and land up in job as data analyst. Thanks a lot for the great work and helping out so many people around the globe.
Hey Alex, thank you so much for this series on Mysql. I really appricaite all the hard work you've put to bring us this amazing work. Your way of explaning topics is so easy. Thanks again.
Greetings Alexs & All. Just finished watching this lesson at work. Can hardly wait until I get home to run the code on my personal laptop (No MySQL @ work - BOO!). Everything Alex presented here made sense to me. Lots to digest & eventually memorize. Good thing there's a couple of projects to work through to start the process. Cheers! BB😎 UPDATE: Just finished working through Alex's code at home. Worked perfectly, no issues. Thanks again Alex!
Hi Alex I am really really glad that I went through with this. I already have a masters degree in this but I don’t know about the coding language and anything but now I am starting to click into 8t. Thank you lots of love
Alex made learning so easy with the way he teaches, he made me come this far. Thank you Alex. I'm really Hoping I become an expert in D.A soon. Anybody want to connect so that we can learn together?
An amazing SQL course Alex, thank you so much! I heard about normalisation, primary and foreign keys and optimisation, would there be any way of creating a couple videos for these? Love the way you teach so if this is possible I would be truly thankful!
Hi Alex! I love your videos, I've been watching them to review for my technical interviews! Do you think you could make a video going over date and time functions in MySQL? I'm having a hard time finding some good ones here on RUclips. Thanks for everything!
Hoping you can make a playlist for SQL Debugging (Exploring errors and how to fix that, I know there's a lot of error we may encounter but this is very helpful). Anyway thanks for the SQL topics, very insightful.
Hello Mr. Freberg. I have a short question.first of all Thanks for your channel. I am following you from your freecodecamp video. I just find out that you teach other things in your freecodecamp course ( like here it is Mysql and there you use Microsoft sql . of course all they both uses sql but there are some differences as well) I just want to ask you which one of your courses do you recommend ?
To what extent is it needed to know stored procedures + triggers and events? I've asked it also on Reddit and it seems that it is in the realm of "things SQL can do" but not "things you need to know, unless you encounter it" What do you think? I don't mind (re)learning it (I'm coming from a dev background), but I'd rather do the 80/20 as I don't need to secure a job. I got one in 2 weeks
nice and informative video, but can you tell me that, how do we decide that when to use AFTER trigger and when to use BEFORE trigger?? like is there any general rule?
when i am running this trigger getting error 11:55:29 insert into employee_salary (employee_id, first_name,last_name,occupation ,salary,dept_id) values (13,'anshu','saxena','ceo',1000000,null) Error Code: 1054. Unknown column 'empoyee_id' in 'field list' 0.000 sec can someone help
Ok Alex the analyst ; intend to make a huge session of learning how to do things with your vidéo that are just incredeables, but the question will be : how did you learned so much in such a short Time (sorry for my english speacking, i'm french)
I am getting syntax errors and the error 'CREATE TRIGGER' must be the first statement in a query batch. I can't seem to find a solution. Does anyone know the cause of this error?
Hey guys, is there anyone who got error code 1442 (Can't update table in stored function/trigger because it is already used by statement which invoked this stored function) while practicing with Triggers in mysql? If so, let me know how you handled the problem, I've been stuck at it for a while.
DROP EVENT IF EXISTS delete_retirees; (try this) DELIMITER $$ (then run this again) CREATE EVENT delete_retirees ON SCHEDULE EVERY 30 SECOND DO BEGIN DELETE FROM employee_demographics WHERE age >= 60; END $$ DELIMITER ; select* (then run this) from employee_demographics;
I had the same problem. However, after doing everything Alex suggested, I changed the event name to 'delete_retirees' (I just recreated the event with a different name). I reran the code, and it worked. It might work for you too!
Hey Alex, just wanted to say I’ve been following your projects and followed your videos on how to build your resume, and was blessed to receive a job offer because of you. Thank you for everything.
ممكن مساعدة ازاى عملت بروفايل عشان يجى لك وظيفة
Awesome!
are you from pakistan? i need your help.
Congratulations
Congratulations! I hope to be in the same boat as you soon!
🎯 Key Takeaways for quick navigation:
00:00 *📝 Introduction to Triggers in MySQL*
- Triggers in MySQL automatically execute code when specific events occur on a table.
- Triggers are useful for maintaining data consistency and automating tasks based on data changes.
- A trigger consists of a name, event, and action to perform after the event.
03:26 *🔧 Creating a Trigger in MySQL*
- Delimiters in MySQL are essential for handling multi-line queries, allowing multiple statements within a single query.
- Triggers are defined using the `CREATE TRIGGER` statement with specific event conditions.
- Triggers can be set to execute before or after an event, such as insertion, deletion, or update.
08:50 *🔄 Testing and Utilizing Triggers*
- Triggers provide a mechanism for automating tasks, such as updating related tables when data changes occur.
- Testing triggers involves inserting data to observe trigger behavior and ensure proper functionality.
- Triggers save time and effort in maintaining data integrity and consistency in real-world database operations.
09:04 *🗓️ Introduction to Events in MySQL*
- Events in MySQL are scheduled tasks that can be executed at specified intervals.
- Unlike triggers, events are not triggered by data changes but are executed according to a predefined schedule.
- Events are beneficial for automating recurring tasks such as data imports, exports, or cleanup operations.
11:08 *⏰ Creating Scheduled Events in MySQL*
- MySQL events are created using the `CREATE EVENT` statement, specifying the schedule and actions to be performed.
- Scheduled events can execute SQL statements, allowing for data manipulation, cleanup, or reporting tasks.
- Events provide a convenient way to automate routine database maintenance and management tasks.
13:52 *🔍 Testing and Troubleshooting MySQL Events*
- Testing MySQL events involves verifying their execution according to the defined schedule and expected actions.
- Troubleshooting event creation issues may require checking the status of the event scheduler and adjusting user permissions.
- Understanding the nuances of event scheduling ensures effective automation of database tasks while minimizing errors.
Made with HARPA AI
Hey Alex,
I wanted to thank you for this bootcamp. It's so kind of you to offer these treasures for free. You've made becoming a DA even easier and less daunting. Thank you!
Can't wait to start the projects next!
I'm so glad I came across this series 👍
Thanks Alex!
Hey Alex, thanks for this series on MySQL. The way you explain things is so dynamic and clear, you really do a great work! Also, your examples with The Office and Parks and Recs characters are simply fantastic. We have fun while learning and this is amazing. Thanks for all that !
Just finished the series and I'm amazed on how you teach. I full understand every detail unlike other online courses.
hey alex recently found your channel and has followed through this series had amazing chance to learn new things and clear out the previous topics thanx for this bootcamp
I am having a great time learning with your series for MySQL which I did not even learn in my Coursera course ! Everything is explained in a simple way to understand. I plan to finish the bootcamp and land up in job as data analyst. Thanks a lot for the great work and helping out so many people around the globe.
I have just finished the course series and am eager to get started on the upcoming projects!
for some reason this was by far my favorite lesson. Thank you Alex!
Hey Alex, thank you so much for this series on Mysql. I really appricaite all the hard work you've put to bring us this amazing work. Your way of explaning topics is so easy. Thanks again.
very useful series, i finished the sql and excel so far. very excited for the projects
Greetings Alexs & All. Just finished watching this lesson at work. Can hardly wait until I get home to run the code on my personal laptop (No MySQL @ work - BOO!). Everything Alex presented here made sense to me. Lots to digest & eventually memorize. Good thing there's a couple of projects to work through to start the process. Cheers! BB😎
UPDATE: Just finished working through Alex's code at home. Worked perfectly, no issues. Thanks again Alex!
Hi Alex I am really really glad that I went through with this. I already have a masters degree in this but I don’t know about the coding language and anything but now I am starting to click into 8t. Thank you lots of love
Alex made learning so easy with the way he teaches, he made me come this far. Thank you Alex. I'm really Hoping I become an expert in D.A soon.
Anybody want to connect so that we can learn together?
Thanks Alex!
Thank you Alex! You're my SQL idol!
An amazing SQL course Alex, thank you so much! I heard about normalisation, primary and foreign keys and optimisation, would there be any way of creating a couple videos for these? Love the way you teach so if this is possible I would be truly thankful!
No badges on this level?🎉🎉
Thank you so much Alex
Thank you, Alex, I am very great full that I have learned a lot of things from Basic to Advanced level. you are Great
your videos trigger me to excel SQL
Enjoyed, poor Jerry finally getting a break
Hi Alex! I love your videos, I've been watching them to review for my technical interviews! Do you think you could make a video going over date and time functions in MySQL? I'm having a hard time finding some good ones here on RUclips. Thanks for everything!
Hoping you can make a playlist for SQL Debugging (Exploring errors and how to fix that, I know there's a lot of error we may encounter but this is very helpful). Anyway thanks for the SQL topics, very insightful.
Love your videos Alex, always learn something new. 'Preciate you
Hi Alex, thanks for the great work. I am a beginner and these videos are beneficial.
Hello Mr. Freberg. I have a short question.first of all Thanks for your channel. I am following you from your freecodecamp video. I just find out that you teach other things in your freecodecamp course ( like here it is Mysql and there you use Microsoft sql . of course all they both uses sql but there are some differences as well) I just want to ask you which one of your courses do you recommend ?
my sql is best
Great! Thanks!!! I was looking to Know More about triggers!
Great Work Alex.
Hi Alex, could you please create a tutorial for 'views'?
Hey Alex, quick question, when do we have to use "Lightning bolt without the "I" and the one WITH the "I" to run individual queries?
Thank you Alex
I will enjoy it here 🥰
hi, where can I look at those 2 projects that you are mentioned in the video: Data Cleaning Project & Exploratory Data Analysis Project. Thanks Alex!!
Check his RUclips channel; there's a data analyst boot camp playlist
The video you mentioned is there
GOD BLESS YOU, ALEX!
To what extent is it needed to know stored procedures + triggers and events? I've asked it also on Reddit and it seems that it is in the realm of "things SQL can do" but not "things you need to know, unless you encounter it"
What do you think?
I don't mind (re)learning it (I'm coming from a dev background), but I'd rather do the 80/20 as I don't need to secure a job. I got one in 2 weeks
What is an event used for? When will it be used in real life situation?
if the "event scheduler" value is off, do we edit it on the table itself or is there a specific code to write to turn it on?
nice and informative video, but can you tell me that, how do we decide that when to use AFTER trigger and when to use BEFORE trigger?? like is there any general rule?
Thank You Alex, and sorry for Jerry Gergich
How can you delete a trigger, I made an error when creating trigger employee insert and the insert into employee salary won’t work
DROP TRIGGER name_of_the_trigger;
what's the code for "before" - to store the data somewhere BEFORE its deleted
Hi Alex, is the market for Data Analysts oversaturated?
very
It's a new field
@Alex The Analyst how do you insert multiple row data in one go?
when i am running this trigger getting error
11:55:29 insert into employee_salary (employee_id, first_name,last_name,occupation ,salary,dept_id) values (13,'anshu','saxena','ceo',1000000,null) Error Code: 1054. Unknown column 'empoyee_id' in 'field list' 0.000 sec
can someone help
You can seee that you mistyped the name of the column "
empoyee_id, you forgot 'l'
It's 'employee_id'
Hi, I did everything (troubleshooting), but jerry still doesn't get deleted. Can anyone explain that to me please?
me too. I went back and it doesnt delete as well.
Same here
let jerry have a job
thank you so much it was very helpful
This is cool!
Thank you very much!
Ok Alex the analyst ; intend to make a huge session of learning how to do things with your vidéo that are just incredeables, but the question will be : how did you learned so
much in such a short Time (sorry for my english speacking, i'm french)
Events not working for me, tried troubleshooting the also
Thanks for this .
O little bit difficult 😊
Damn you Ron Swanson!
Thank you so much sempai🙏🔥💌
How do i add multiple entries into a my trigger
I did all the recommendations but creation of event still doesn't work , anyone to help please?
Thanks
I am getting syntax errors and the error 'CREATE TRIGGER' must be the first statement in a query batch. I can't seem to find a solution. Does anyone know the cause of this error?
End the before statement with the 'go' statement and issue will be resolved.
Not working for me
Why not?
make VDOs on recursive query ...
thank you
AMAZING
Hey guys, is there anyone who got error code 1442 (Can't update table in stored function/trigger because it is already used by statement which invoked this stored function) while practicing with Triggers in mysql? If so, let me know how you handled the problem, I've been stuck at it for a while.
DROP EVENT IF EXISTS delete_retirees; (try this)
DELIMITER $$ (then run this again)
CREATE EVENT delete_retirees
ON SCHEDULE EVERY 30 SECOND
DO
BEGIN
DELETE FROM employee_demographics
WHERE age >= 60;
END $$
DELIMITER ;
select* (then run this)
from employee_demographics;
Hiii. I just started this and I'm getting the same error. Were you able to fix it by chance?
DROP TRIGGER name_trigger
even after every check jerry gergich still exist in my employee demographics
I had the same problem. However, after doing everything Alex suggested, I changed the event name to 'delete_retirees' (I just recreated the event with a different name). I reran the code, and it worked. It might work for you too!
check if you also remembered to change the "select * " statement to "delete" instead, inside the begin-end command
Poor Jerry got deleted
alex youre mean to older people
not jerry again
Poor Jerry
Thank you
AMAZING