SQLite TriggersSQLite Trigger is an event-driven action or database callback function which is invoked automatically when an INSERT, UPDATE, and DELETE statement is performed on a specified table. The main tasks of triggers are like enforcing business rules, validating input data, and keeping an audit trail. Usage of Triggers:
Advantages of using triggers:
How to create triggerThe CREATE TRIGGER statement is used to create a new trigger in SQLite. This statement is also used to add triggers to the database schema. Syntax: Here, trigger_name is the name of trigger which you want to create. event_name could be INSERT, DELETE, and UPDATE database operation. table_name is the table on which you do the operation. Next TopicSQLite Trigger After Insert |