A trigger is a procedural code that is automatically executed in response to certain events on a table or view such as insert, update or delete. For example, a trigger can be created to log changes or validate data when records are inserted or updated. It may be more appropriate to declare an attribute containing only digits as a character data type instead of a numeric data type if the attribute is intended to include leading zeros, contain text or non-numeric values, or if calculations will not be performed on the data.