In databases such as IBM DB2, Oracle, and SQL Server, triggers are user-defined functions that are executed automatically when a database event occurs. The event can be a data definition event (for example, a table is created, altered, or dropped) or a data manipulation event (for example, a row is inserted, updated or deleted from table).
In DatabaseSpy, triggers are shown with the icon.
In the Online Browser, triggers defined at table level are shown in the "Triggers" folder of the respective table (or view, if applicable).
Triggers at database or schema level are shown in the "Triggers" folder of the respective database or schema.
|Note:||Server-level triggers (in SQL Server databases) are not supported in DatabaseSpy.|
You can use an existing trigger as a basis for creating a new trigger definition or dropping a trigger from the database. The context menu in the Online Browser provides several options in this respect, see Generating SQL Statements.