Triggers and Events in MySQL | Advanced MySQL Series

preview_player
Показать описание

In this lesson we are going to take a look at Triggers and Events in MySQL!

____________________________________________

SUBSCRIBE!
Do you want to become a Data Analyst? That's what this channel is all about! My goal is to help you learn everything you need in order to start your career or even switch your career into Data Analytics. Be sure to subscribe to not miss out on any content!
____________________________________________

RESOURCES:

Coursera Courses:

Udemy Courses:

*Please note I may earn a small commission for any purchase through these links - Thanks for supporting the channel!*
____________________________________________

BECOME A MEMBER -

Want to support the channel? Consider becoming a member! I do Monthly Livestreams and you get some awesome Emoji's to use in chat and comments!

____________________________________________

Websites:
📱Instagram: @Alex_The_Analyst
____________________________________________

*All opinions or statements in this video are my own and do not reflect the opinion of the company I work for or have ever worked for*
Рекомендации по теме
Комментарии
Автор

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.

mustafaabdelaziz
Автор

🎯 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

zainabusama-utos
Автор

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!

BruceBeck-fn
Автор

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

shilpa
Автор

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.

emansabra-ng
Автор

Thank You Alex, and sorry for Jerry Gergich

benardwanjai
Автор

Hi Alex, could you please create a tutorial for 'views'?

salmanahmed-wmdz
Автор

Hi Alex, thanks for the great work. I am a beginner and these videos are beneficial.

ARAOYEOMOTOLA
Автор

Great! Thanks!!! I was looking to Know More about triggers!

isaacfigueroa
Автор

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 !

SobreoEscrito
Автор

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?

dragnar
Автор

What is an event used for? When will it be used in real life situation?

tutran-pvvu
Автор

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?

rahalvithanage
Автор

@Alex The Analyst how do you insert multiple row data in one go?

jasxteo
Автор

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)

julienmonso-lqqr
Автор

Thanks for this .
O little bit difficult 😊

Mr.Arshad-ocfd
Автор

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!!

vangiang
Автор

Hi, I did everything (troubleshooting), but jerry still doesn't get deleted. Can anyone explain that to me please?

adityadhiman
Автор

Events not working for me, tried troubleshooting the also

kanikasuneja
Автор

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 Code: 1054. Unknown column 'empoyee_id' in 'field list' 0.000 sec

can someone help

anshusaxena
join shbcf.ru