How to Update a Table With a Trigger in MySQL


show more Updating a table with a trigger provides you with in-depth training on Developer. Taught by Bill Weinman as part of the MySQL Essential Training show less
please wait ...

Updating a table with a trigger

A trigger is an operation that's automatically performed when a specific database event occurs. A common use for triggers is to force a table to be updated, whenever a row's inserted or updated in another table. How triggers are implemented and used vary significantly from system to system and MySQL is no exception. The syntax used here will work with MySQL and will need to be modified, if you want to use these techniques in another database management system. For this example, we're going to be using the scratch database and we're going to be copying and pasting from the Chapter 7 File in the exercise files.

And I'm just going to grab all this code from right here till right there, and I'm going to copy and paste that but before we do that, let's take a look at the code and see what it does. Here, we create a couple of tables. The first one is a customer table and it has a serial number ID and it has a name for the customer and a last order ID, which is what we're going t...

Updating a table with a trigger
Video duration: 5m 11s 4h 24m Beginner

Viewers:

Updating a table with a trigger provides you with in-depth training on Developer. Taught by Bill Weinman as part of the MySQL Essential Training

Subject:
Developer
Software:
MySQL
Author:
please wait ...