Creating a Trigger

Example:

CREATE TRIGGER products_after_insert AFTER INSERT ON products
REFERENCING NEW TABLE AS pdt
FOR EACH STATEMENT
BEGIN ATOMIC
-- Force the update trigger to fire
UPDATE products
SET product_search = DEFAULT
WHERE product_id IN (SELECT product_id
FROM pdt);
END -- of trigger products_after_insert

A trigger is created on a named table or view and the trigger must be created in the schema to which the table or view belongs. If the trigger is created on a base table, the table must be stored in a databank with the TRANS or LOG option.