Learn how a trigger can be an excellent way to enforce business rules that require a table to be updated whenever another table is updated.
- [Narrator] A trigger is an operation…that is automatically performed…when a specified database event occurs.…Triggers were introduced in the SQL standard in 2003.…Unfortunately most database systems…had already implemented triggers…so each system still has their own syntax.…How triggers are implemented and used…varies significantly from system to system.…The lessons in this chapter are intended as an overview…to give you a sense of how triggers work.…For this lesson we're going to be using the test database,…and I'm gonna be copying and pasting…from the exercise files for chapter 10.…
And so I'll start here,…and I'm just gonna go this far.…Gonna get these 'create table', 'insert',…and this 'select' statement.…I'll copy that and paste it here and execute.…So we've created a couple of tables.…WidgetCustomer, which we see selected at the bottom there,…and widgetSale which does not have any rows in it yet.…widgetCustomer has the name…and a last order ID for the customer.…And widgetSale has an item ID,…a customer ID, quantity, and price.…
- Understanding SQL terminology and syntax
- Creating new tables
- Inserting and updating data
- Writing basic SQL queries
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Defining functions in PHP
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times1m 52s
11. Views and Subselects
12. Defined Functions
13. A Simple CRUD Application
- 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.