# RazorSQL

## Query, Edit, Browse, and Manage Databases

- razorsql.com
- Contact

# Create Trigger

The Create Trigger Tool allows users to create triggers for a database. The tool generates the SQL create trigger command. The following example is for MS SQL Server:
CREATE TRIGGER dbo.test_trigger
ON -- table_name
-- WITH ENCRYPTION
FOR -- DELETE, INSERT, UPDATE
-- WITH APPEND
-- NOT FOR REPLICATION
AS
-- insert sql here

The create trigger tool writes out a template specific to the database to the SQL editor. That template includes options in comments that users can select to create the trigger. Once the appropriate options are selected, executing the create trigger command will attempt to create the trigger in the database. If there are any compilation errors, they will be displayed by RazorSQL.

Listed below are the databases for which RazorSQL has a Create Trigger tool.

DB2 Create Trigger
Derby Create Trigger
Firebird Create Trigger
Informix Create Trigger
MySQL Create Trigger
Oracle Create Trigger
PostgreSQL Create Trigger
MS SQL Server Create Trigger
SQLite Create Trigger
SQL Anywhere Create Trigger
Sybase Create Trigger