September 2010
Intermediate to advanced
1704 pages
111h 8m
English
The basic syntax for creating a DDL trigger follows:

The best way to illustrate the use of the DDL trigger syntax and power of these triggers is to look at a few examples. The example shown in Listing 30.14 illustrates the creation of a DDL trigger that is scoped at the database level and prevents table-level changes.
Listing 30.14 A Database-Scoped DDL Trigger for Tables

This trigger is fired whenever the CREATE, ALTER, or DROP TABLE statements are executed. Consider, for example, the following statements that can be run ...