What is a trigger in SQL?
A trigger is a special type of stored procedure that automatically runs when an event occurs or takes place in the database server. DML triggers run when a user tries to modify or update data through a data manipulation language (DML) event. DML events are INSERT, UPDATE, or DELETE statements on a database table or view.
For example, a trigger can be invoked when a row is inserted into a specified table or when certain table columns are being updated.
The syntax of the CREATE TRIGGER statement illustrates as follows:
CREATE TRIGGER [schema_name.]trigger_name ON table_name AFTER ?{[INSERT],[UPDATE],[DELETE]} [NOT FOR REPLICATION] AS {sql_statements}
What is a View in SQL?
What is the use of Cross Join in SQL?
What is the use of Full Join in SQL?
What are the properties of a transaction in SQL?
Which is not the properties of a transaction in SQL?