{"id":1187,"date":"2016-01-12T21:45:35","date_gmt":"2016-01-12T21:45:35","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=1187"},"modified":"2016-01-12T22:28:52","modified_gmt":"2016-01-12T22:28:52","slug":"how-to-create-drop-trigger-in-mysql","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/","title":{"rendered":"How to Create &#038; Drop Trigger in MySQL"},"content":{"rendered":"<p>A trigger is associated with a database table and it is invoked when a particular event occurs for that table. A trigger is activated when a statement insert, update, or delete rows in the associated table, this is called the trigger events. A trigger can be activated either before or after the trigger events.<\/p>\n<p>In this MySQL Trigger tutorial, you will learn how to create a trigger in MySQL. Also, we&#8217;ll show the MySQL statements to show and drop the created triggers.<\/p>\n<p>For your better understand we&#8217;ll demonstrate trigger uses with a sample table called <code>users<\/code>. This table has <code>id<\/code>, <code>first_name<\/code>, <code>last_name<\/code>, and <code>full_name<\/code> columns.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-database-table-by-codexworld.png\" alt=\"mysql-triggers-tutorial-database-table-by-codexworld\" width=\"596\" height=\"225\" class=\"alignnone size-full wp-image-1191\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-database-table-by-codexworld.png 596w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-database-table-by-codexworld-300x113.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-database-table-by-codexworld-200x76.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-database-table-by-codexworld-346x131.png 346w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/div>\n<h2>Create Trigger<\/h2>\n<p>Now we&#8217;ll create a trigger for inserting <code>full_name<\/code> column value when a row is inserted in <code>users<\/code> table. <code>full_name<\/code> value would be the combination of <code>first_name<\/code> and <code>last_name<\/code> value.<\/p>\n<pre><span style=\"color:#794938\">CREATE<\/span> <span style=\"color:#794938\">TRIGGER<\/span> <span style=\"color:#bf4f24\">before_user_insert<\/span> BEFORE INSERT <span style=\"color:#794938\">ON<\/span>  users\r\nFOR EACH ROW\r\n<span style=\"color:#794938\">SET<\/span> <span style=\"color:#811f24;font-weight:700\">NEW<\/span>.<span style=\"color:#811f24;font-weight:700\">full_name<\/span> <span style=\"color:#794938\">=<\/span> CONCAT(<span style=\"color:#811f24;font-weight:700\">NEW<\/span>.<span style=\"color:#811f24;font-weight:700\">first_name<\/span>, <span style=\"color:#0b6125\">' '<\/span>, <span style=\"color:#811f24;font-weight:700\">NEW<\/span>.<span style=\"color:#811f24;font-weight:700\">last_name<\/span>);<\/pre>\n<p>Run the above SQL in your database.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-insert-by-codexworld.png\" alt=\"mysql-triggers-tutorial-create-trigger-before-insert-by-codexworld\" width=\"653\" height=\"369\" class=\"alignnone size-full wp-image-1192\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-insert-by-codexworld.png 653w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-insert-by-codexworld-300x170.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-insert-by-codexworld-200x113.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-insert-by-codexworld-346x196.png 346w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/div>\n<p>Run the insert query to the <code>users<\/code> table.<\/p>\n<pre><span style=\"color:#794938\">INSERT INTO<\/span> users(first_name,last_name) <span style=\"color:#794938\">VALUES<\/span>(<span style=\"color:#0b6125\">'Codex'<\/span>,<span style=\"color:#0b6125\">'World'<\/span>);<\/pre>\n<p>Browse the <code>users<\/code> table, you&#8217;ll see the <code>full_name<\/code> column value is automatically inserted as per the <code>first_name<\/code> and <code>last_name<\/code> value.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-insert-into-database-table-by-codexworld.png\" alt=\"mysql-triggers-tutorial-insert-into-database-table-by-codexworld\" width=\"500\" height=\"124\" class=\"alignnone size-full wp-image-1193\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-insert-into-database-table-by-codexworld.png 500w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-insert-into-database-table-by-codexworld-300x74.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-insert-into-database-table-by-codexworld-200x50.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-insert-into-database-table-by-codexworld-346x86.png 346w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/div>\n<p>Also, you need to update the <code>full_name<\/code> column value as per the <code>first_name<\/code> and <code>last_name<\/code> value when a row is updated. The below trigger statement helps you to do that.<\/p>\n<pre><span style=\"color:#794938\">CREATE<\/span> <span style=\"color:#794938\">TRIGGER<\/span> <span style=\"color:#bf4f24\">before_user_update<\/span> BEFORE <span style=\"color:#794938\">UPDATE<\/span> <span style=\"color:#794938\">ON<\/span>  users\r\nFOR EACH ROW\r\n<span style=\"color:#794938\">SET<\/span> <span style=\"color:#811f24;font-weight:700\">NEW<\/span>.<span style=\"color:#811f24;font-weight:700\">full_name<\/span> <span style=\"color:#794938\">=<\/span> CONCAT(<span style=\"color:#811f24;font-weight:700\">NEW<\/span>.<span style=\"color:#811f24;font-weight:700\">first_name<\/span>, <span style=\"color:#0b6125\">' '<\/span>, <span style=\"color:#811f24;font-weight:700\">NEW<\/span>.<span style=\"color:#811f24;font-weight:700\">last_name<\/span>);\r\n<\/pre>\n<p>Run the above SQL in your database.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-update-by-codexworld.png\" alt=\"mysql-triggers-tutorial-create-trigger-before-update-by-codexworld\" width=\"653\" height=\"367\" class=\"alignnone size-full wp-image-1194\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-update-by-codexworld.png 653w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-update-by-codexworld-300x169.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-update-by-codexworld-200x112.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-create-trigger-before-update-by-codexworld-346x194.png 346w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/div>\n<p>Run the update query to the <code>users<\/code> table.<\/p>\n<pre><span style=\"color:#794938\">UPDATE<\/span> users <span style=\"color:#794938\">SET<\/span> first_name<span style=\"color:#794938\">=<\/span><span style=\"color:#0b6125\">'Codexworld'<\/span>,last_name<span style=\"color:#794938\">=<\/span><span style=\"color:#0b6125\">'Blog'<\/span>;<\/pre>\n<p>Browse the <code>users<\/code> table, you&#8217;ll see the <code>full_name<\/code> column value is automatically updated as per the updated value of <code>first_name<\/code> and <code>last_name<\/code>.<\/p>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-update-into-database-table-by-codexworld.png\" alt=\"mysql-triggers-tutorial-update-into-database-table-by-codexworld\" width=\"520\" height=\"116\" class=\"alignnone size-full wp-image-1195\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-update-into-database-table-by-codexworld.png 520w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-update-into-database-table-by-codexworld-300x67.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-update-into-database-table-by-codexworld-200x45.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-update-into-database-table-by-codexworld-346x77.png 346w\" sizes=\"auto, (max-width: 520px) 100vw, 520px\" \/><\/div>\n<h2>Show Triggers<\/h2>\n<p>The following statement lists the triggers defined in a database.<\/p>\n<pre><span style=\"color:#794938\">SHOW <\/span> <span style=\"color:#794938\">TRIGGERS<\/span><\/pre>\n<div class=\"img_center\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-show-triggers-by-codexworld.png\" alt=\"mysql-triggers-tutorial-show-triggers-by-codexworld\" width=\"879\" height=\"426\" class=\"alignnone size-full wp-image-1196\" srcset=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-show-triggers-by-codexworld.png 879w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-show-triggers-by-codexworld-300x145.png 300w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-show-triggers-by-codexworld-768x372.png 768w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-show-triggers-by-codexworld-200x97.png 200w, https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/mysql-triggers-tutorial-show-triggers-by-codexworld-346x168.png 346w\" sizes=\"auto, (max-width: 879px) 100vw, 879px\" \/><\/div>\n<h2>Drop Trigger<\/h2>\n<p>The following statement drops a trigger.<\/p>\n<pre><span style=\"color:#794938\">DROP<\/span> <span style=\"color:#794938\">TRIGGER<\/span> before_user_insert;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A trigger is associated with a database table and it is invoked when a particular event occurs for that table. A trigger is activated when a statement insert, update, or delete rows in the associated <\/p>\n","protected":false},"author":1,"featured_media":1201,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[96],"tags":[19,118],"class_list":["post-1187","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql","tag-mysql","tag-triggers","cat-96-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Create &amp; Drop Trigger in MySQL - CodexWorld<\/title>\n<meta name=\"description\" content=\"MySQL create trigger before insert or update - Learn how to create trigger, drop trigger, and show triggers in MySQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create &amp; Drop Trigger in MySQL - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"MySQL create trigger before insert or update - Learn how to create trigger, drop trigger, and show triggers in MySQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-12T21:45:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-01-12T22:28:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"641\" \/>\n\t<meta property=\"og:image:height\" content=\"353\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"How to Create &#038; Drop Trigger in MySQL\",\"datePublished\":\"2016-01-12T21:45:35+00:00\",\"dateModified\":\"2016-01-12T22:28:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/\"},\"wordCount\":247,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/01\\\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png\",\"keywords\":[\"MySQL\",\"Triggers\"],\"articleSection\":[\"MySQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/\",\"name\":\"How to Create & Drop Trigger in MySQL - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/01\\\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png\",\"datePublished\":\"2016-01-12T21:45:35+00:00\",\"dateModified\":\"2016-01-12T22:28:52+00:00\",\"description\":\"MySQL create trigger before insert or update - Learn how to create trigger, drop trigger, and show triggers in MySQL.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/01\\\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2016\\\/01\\\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png\",\"width\":641,\"height\":353,\"caption\":\"how-to-create-drop-show-trigger-in-mysql-by-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/how-to-create-drop-trigger-in-mysql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create &#038; Drop Trigger in MySQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create & Drop Trigger in MySQL - CodexWorld","description":"MySQL create trigger before insert or update - Learn how to create trigger, drop trigger, and show triggers in MySQL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/","og_locale":"en_US","og_type":"article","og_title":"How to Create & Drop Trigger in MySQL - CodexWorld","og_description":"MySQL create trigger before insert or update - Learn how to create trigger, drop trigger, and show triggers in MySQL.","og_url":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2016-01-12T21:45:35+00:00","article_modified_time":"2016-01-12T22:28:52+00:00","og_image":[{"width":641,"height":353,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"How to Create &#038; Drop Trigger in MySQL","datePublished":"2016-01-12T21:45:35+00:00","dateModified":"2016-01-12T22:28:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/"},"wordCount":247,"commentCount":0,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png","keywords":["MySQL","Triggers"],"articleSection":["MySQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/","url":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/","name":"How to Create & Drop Trigger in MySQL - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png","datePublished":"2016-01-12T21:45:35+00:00","dateModified":"2016-01-12T22:28:52+00:00","description":"MySQL create trigger before insert or update - Learn how to create trigger, drop trigger, and show triggers in MySQL.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png","width":641,"height":353,"caption":"how-to-create-drop-show-trigger-in-mysql-by-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/how-to-create-drop-trigger-in-mysql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"How to Create &#038; Drop Trigger in MySQL"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2016\/01\/how-to-create-drop-show-trigger-in-mysql-by-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-j9","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/1187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=1187"}],"version-history":[{"count":3,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/1187\/revisions"}],"predecessor-version":[{"id":1198,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/1187\/revisions\/1198"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/1201"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=1187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=1187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=1187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}