April 2026
Beginner
493 pages
23h 2m
English
In a production database environment, task automation is an essential tool in our toolbox. In this section, we’ll explore two powerful tools for automation: stored procedures and triggers.
Stored procedures allow us to create SQL-based subroutines in the database that we can then execute either manually or on a schedule to complete specific tasks. Triggers, on the other hand, are also SQL based subroutines, but they get executed by the database engine upon a change in a table.
This difference highlights the use cases of those mechanisms. Stored procedures preferably contain SQL code to be executed occasionally, while triggers preferably contain SQL code to be executed automatically (upon an INSERT ...
Read now
Unlock full access