Книга: Fedora™ Unleashed, 2008 edition

Procedural Languages and Triggers

Procedural Languages and Triggers

A procedural language is an external programming language that can be used to write functions and procedures. This enables you to do things that aren't supported by simple SQL. A trigger allows you to define an event that will invoke the external function or procedure you have written. For example, a trigger can be used 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 entered data that did 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, it does not have any procedural language. This means you cannot create custom procedures or triggers in MySQL, although the same effects can often be achieved through creative client-side programming.

Оглавление книги


Генерация: 1.072. Запросов К БД/Cache: 3 / 1
поделиться
Вверх Вниз