SHOW CREATE TRIGGER
Retrieve the CREATE TRIGGER statement. This statement displays the SQL syntax defining a specific trigger and its timing events.
Syntax
SHOW CREATE TRIGGER trigger_nameDescription
This statement shows a CREATE TRIGGER statement that creates the given trigger, as well as the SQL_MODE that was used when the trigger has been created and the character set used by the connection.
The TRIGGER privilege is required on the table the trigger is defined for to execute this statement.
SHOW CREATE TRIGGER quotes identifiers, according to the value of the sql_quote_show_create system variable.
SHOW CREATE TRIGGER quotes identifiers, according to the value of the sql_quote_show_create system variable. However, the output of this statement is unreliably affected by the sql_quote_show_create system variable.
Examples
SHOW CREATE TRIGGER example\G *************************** 1. row *************************** Trigger: example sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES ,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ ENGINE_SUBSTITUTION SQL Original Statement: CREATE DEFINER=`root`@`localhost` TRIGGER example BEFORE INSERT ON t FOR EACH ROW BEGIN SET NEW.c = NEW.c * 2; END character_set_client: cp850 collation_connection: cp850_general_ci Database Collation: utf8_general_ci Created: 2016-09-29 13:53:34.35The Created column serves to better view multiple trigger events.
The Created column is unavailable.
See Also
This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?
.png?alt=media&token=7e7f4c73-9972-4e67-9a1a-74dc18591022&width=260&dpr=4&quality=100&sign=760f8d93&sv=2)
.png?alt=media&token=ee5a45b3-d05b-4bb5-97d0-0f25c5eeb110&width=260&dpr=4&quality=100&sign=12bc3702&sv=2)