Procedural Languages and Triggers
A procedural language is an external programming language that you can use to write functions and procedures. With a procedural language, you can do things that aren’t supported by simple SQL. A trigger enables you to define an event that invokes the external function or procedure you have written. For example, you can use a trigger to cause an exception if an INSERT statement containing an unexpected or out-of-range value for a column is given.
For example, in the CD tracking database, you could use a trigger to cause an exception if a user enters data that does not make sense. PostgreSQL has a procedural language called PL/pgSQL. Although MySQL has support for a limited number of built-in procedures and triggers, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access