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, ...

Get Ubuntu Unleashed 2014 Edition: Covering 13.10 and 14.04,Ninth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.