…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 to be updating as a result of the trigger.…
- Writing queries
- Creating and updating databases and tables
- Using MySQL built-in functions
- Sorting and filtering data
- Updating tables with triggers
- Working with subselects and views
- Creating and using a stored function
Skill Level Beginner
1. Installing and Configuring the Test Environment
2. Basic Syntax
3. Creating a Database
4. MySQL Data Types
5. MySQL Functions
8. Subselects and Views
9. Stored Routines
10. PHP's PDO Interface with MySQL
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.