{"id":3328,"date":"2018-09-25T21:26:29","date_gmt":"2018-09-25T21:26:29","guid":{"rendered":"https:\/\/dbtut.com\/?p=3328"},"modified":"2018-11-24T20:54:42","modified_gmt":"2018-11-24T20:54:42","slug":"mysql-updatable-insertable-views","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/","title":{"rendered":"MySQL updatable\/Insertable views"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>In MySQL, views are not only\u00a0query-able but also\u00a0updatable. It means that you can use the\u00a0INSERTor\u00a0UPDATE\u00a0statement to insert or\u00a0update rows of the base\u00a0table through the updatable view. In addition, you can use\u00a0DELETE\u00a0statement to remove rows of the underlying table through the view.<\/p>\n<p>However, to create an updatable\u00a0view, the\u00a0SELECT statement\u00a0that defines the view\u00a0must not contain any of the following elements:<\/p>\n<ul>\n<li>Aggregate functions\u00a0such as\u00a0MIN,\u00a0MAX,\u00a0SUM,\u00a0AVG, and\u00a0COUNT.<\/li>\n<li>DISTINCT<\/li>\n<li>GROUP BY\u00a0clause.<\/li>\n<li>HAVING\u00a0clause.<\/li>\n<li>UNION\u00a0or UNION ALL clause.<\/li>\n<li>Left join\u00a0or outer join.<\/li>\n<li>Subquery\u00a0in the\u00a0SELECT\u00a0clause or\u00a0in the\u00a0WHERE\u00a0clause that refers\u00a0to the table\u00a0appeared\u00a0in the FROM clause.<\/li>\n<li>Reference to non-updatable view in the FROM clause.<\/li>\n<li>Reference only to literal values.<\/li>\n<li>Multiple references to any column of the base\u00a0table.<\/li>\n<\/ul>\n<p>If you create a view\u00a0with the\u00a0TEMPTABLE algorithm, you cannot update the view.<\/p>\n<p class=\"tip\">Note that it is sometimes possible to create updatable views based on multiple tables using an\u00a0inner join.<\/p>\n<h2><\/h2>\n<h2>Updatable view example<\/h2>\n<p>Let\u2019s create an updatable view.<\/p>\n<p>First, we create a view named\u00a0<code>officeInfo<\/code>\u00a0\u00a0based on\u00a0the\u00a0<code>offices<\/code>\u00a0\u00a0table below<\/p>\n<pre class=\"lang:default decode:true\">CREATE SCHEMA test_view;\r\nUSE test_view;\r\nDROP TABLE IF EXISTS `offices`;\r\nCREATE TABLE `offices` (\r\n`officeCode` varchar(10) NOT NULL,\r\n`city` varchar(50) NOT NULL,\r\n`phone` varchar(50) NOT NULL,\r\n`addressLine1` varchar(50) NOT NULL,\r\n`addressLine2` varchar(50) DEFAULT NULL,\r\n`state` varchar(50) DEFAULT NULL,\r\n`country` varchar(50) NOT NULL,\r\n`postalCode` varchar(15) NOT NULL,\r\n`territory` varchar(10) NOT NULL,\r\nPRIMARY KEY (`officeCode`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1;\r\n\/*Data for the table `offices` *\/\r\ninsert into `offices`(`officeCode`,`city`,`phone`,`addressLine1`,`addressLine2`,`state`,`country`,`postalCode`,`territory`) values\r\n('1','San Francisco','+1 650 219 4782','100 Market Street','Suite 300','CA','USA','94080','NA'),\r\n('2','Boston','+1 215 837 0825','1550 Court Place','Suite 102','MA','USA','02107','NA'),\r\n('3','NYC','+1 212 555 3000','523 East 53rd Street','apt. 5A','NY','USA','10022','NA'),\r\n('4','Paris','+33 14 723 4404','43 Rue Jouffroy D\\'abbans',NULL,NULL,'France','75017','EMEA'),\r\n('5','Tokyo','+81 33 224 5000','4-1 Kioicho',NULL,'Chiyoda-Ku','Japan','102-8578','Japan'),\r\n('6','Sydney','+61 2 9264 2451','5-11 Wentworth Avenue','Floor #2',NULL,'Australia','NSW 2010','APAC'),\r\n('7','London','+44 20 7877 2041','25 Old Broad Street','Level 7',NULL,'UK','EC2N 1HN','EMEA');<\/pre>\n<p>&nbsp;<\/p>\n<p>The view refers to three columns of the\u00a0<code>offices<\/code>\u00a0\u00a0table:<code>officeCode<\/code>\u00a0<code>phone,\u00a0<\/code>\u00a0and\u00a0<code>city<\/code>.<\/p>\n<pre class=\"lang:default decode:true\">CREATE VIEW officeInfo AS SELECT officeCode, phone, city FROM offices;<\/pre>\n<p>&nbsp;<\/p>\n<p>Next, let query data from the\u00a0<code>officeInfo<\/code>\u00a0view<\/p>\n<pre class=\"lang:default decode:true \">SELECT * FROM officeInfo;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3333\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png\" alt=\"\" width=\"289\" height=\"180\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Then, we can change the phone number of the office with\u00a0<code>officeCode<\/code>\u00a0\u00a04\u00a0through the\u00a0<code>officeInfo<\/code>\u00a0view using the following\u00a0UPDATE\u00a0statement.<\/p>\n<div id=\"crayon-5baa8d68d64b3813146128-1\" class=\"crayon-line\">\n<pre class=\"lang:default decode:true\">UPDATE\u00a0officeInfo\u00a0SET\u00a0phone = '+33 14 723 5555'\u00a0WHERE\u00a0officeCode = 4;<\/pre>\n<p>&nbsp;<\/p>\n<p>To verify\u00a0the change<\/p>\n<\/div>\n<div id=\"crayon-5baa8d68d64b5411571140-1\" class=\"crayon-line\">\n<pre class=\"lang:default decode:true\">SELECT\u00a0*\u00a0FROM\u00a0officeInfo\u00a0WHERE\u00a0officeCode = 4;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3334\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example-with-officeInfo-View.png\" alt=\"\" width=\"248\" height=\"49\" \/><\/p>\n<\/div>\n<p>You can use the same approach to Insert and remove row<\/p>\n<h2><\/h2>\n<h2>Removing rows through the view<\/h2>\n<p>You can run also a simple<span style=\"font-size: 12pt;\"><code>DELETE<\/code>\u00a0statement to remove a row with id value 4.<\/span><\/p>\n<pre class=\"lang:default decode:true\">delete from officeInfo where officeCode=4;<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/125-1.png\" \/><\/p>\n<h2><\/h2>\n<h2>Inserting rows through the view<\/h2>\n<pre class=\"lang:default decode:true\">INSERT INTO officeInfo (officeCode,phone,city) VALUES ('8','+00 000 0000','Benin');\r\nINSERT INTO officeInfo (officeCode,phone,city) VALUES ('9','+00 000 0000','Chicago');<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/194.png\" \/><\/p>\n<h2><\/h2>\n<h2>Checking\u00a0updatable view information<\/h2>\n<p>You can check if a view in a database in updatable by querying the is_updatable column from the views table in the\u00a0<code>information_schema<\/code>\u00a0database.<\/p>\n<p>The following query gets all views from the test_view database\u00a0.<\/p>\n<div id=\"crayon-5baa8d68d64b7257520080-1\" class=\"crayon-line\">\n<pre class=\"lang:default decode:true\">SELECT table_name, is_updatable FROM information_schema.views WHERE table_schema = 'test_view';<\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/355.png\" \/><\/p>\n<\/div>\n\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_3328\" class=\"pvc_stats all  \" data-element-id=\"3328\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; In MySQL, views are not only\u00a0query-able but also\u00a0updatable. It means that you can use the\u00a0INSERTor\u00a0UPDATE\u00a0statement to insert or\u00a0update rows of the base\u00a0table through the updatable view. In addition, you can use\u00a0DELETE\u00a0statement to remove rows of the underlying table through the view. However, to create an updatable\u00a0view, the\u00a0SELECT statement\u00a0that defines the view\u00a0must not contain any &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_3328\" class=\"pvc_stats all  \" data-element-id=\"3328\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7],"tags":[],"class_list":["post-3328","post","type-post","status-publish","format-standard","","category-mysql"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>MySQL updatable\/Insertable views - Database Tutorials<\/title>\n<meta name=\"description\" content=\"MySQL updatable\/Insertable views\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL updatable\/Insertable views - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"MySQL updatable\/Insertable views\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-09-25T21:26:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-11-24T20:54:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png\" \/>\n<meta name=\"author\" content=\"Mikael HOUNDEGNON\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@HOUNDEGNON_MIKE\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mikael HOUNDEGNON\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/\"},\"author\":{\"name\":\"Mikael HOUNDEGNON\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/86e2eaec293d22fa7a83c539631e106f\"},\"headline\":\"MySQL updatable\/Insertable views\",\"datePublished\":\"2018-09-25T21:26:29+00:00\",\"dateModified\":\"2018-11-24T20:54:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/\"},\"wordCount\":317,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png\",\"articleSection\":[\"MySQL-MariaDB\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/\",\"name\":\"MySQL updatable\/Insertable views - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png\",\"datePublished\":\"2018-09-25T21:26:29+00:00\",\"dateModified\":\"2018-11-24T20:54:42+00:00\",\"description\":\"MySQL updatable\/Insertable views\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png\",\"width\":289,\"height\":180},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL updatable\/Insertable views\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/86e2eaec293d22fa7a83c539631e106f\",\"name\":\"Mikael HOUNDEGNON\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a7eeb4be963109ed74e93e6afeaead434866af33be2b30acb0a38a42d30cadb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a7eeb4be963109ed74e93e6afeaead434866af33be2b30acb0a38a42d30cadb6?s=96&d=mm&r=g\",\"caption\":\"Mikael HOUNDEGNON\"},\"description\":\"My name is Mikael HOUNDEGNON. I am an experienced MySQL DBA\/Developer based in the greater Chicago area. You can find out more about me here. I blog here mostly about things I don\u2019t want to forget ? most likely, MySQL Tips. My specialties : MySQL Replication (Master Slave, MultiMaster, Fail over, etc) MySQL Backups MySQL Query Optimization MySQL Performance Tuning MySQL Stored Procedures Storage Engine Tuning Do you have an interesting project idea? Or you just want to chat? Get in touch!\",\"sameAs\":[\"https:\/\/mikaelhoundegnon.wordpress.com\/\",\"https:\/\/x.com\/@HOUNDEGNON_MIKE\"],\"url\":\"https:\/\/dbtut.com\/index.php\/author\/mikaelhoundegnon\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySQL updatable\/Insertable views - Database Tutorials","description":"MySQL updatable\/Insertable views","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:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/","og_locale":"en_US","og_type":"article","og_title":"MySQL updatable\/Insertable views - Database Tutorials","og_description":"MySQL updatable\/Insertable views","og_url":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/","og_site_name":"Database Tutorials","article_published_time":"2018-09-25T21:26:29+00:00","article_modified_time":"2018-11-24T20:54:42+00:00","og_image":[{"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png","type":"","width":"","height":""}],"author":"Mikael HOUNDEGNON","twitter_card":"summary_large_image","twitter_creator":"@HOUNDEGNON_MIKE","twitter_misc":{"Written by":"Mikael HOUNDEGNON","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/"},"author":{"name":"Mikael HOUNDEGNON","@id":"https:\/\/dbtut.com\/#\/schema\/person\/86e2eaec293d22fa7a83c539631e106f"},"headline":"MySQL updatable\/Insertable views","datePublished":"2018-09-25T21:26:29+00:00","dateModified":"2018-11-24T20:54:42+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/"},"wordCount":317,"commentCount":0,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png","articleSection":["MySQL-MariaDB"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/","url":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/","name":"MySQL updatable\/Insertable views - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png","datePublished":"2018-09-25T21:26:29+00:00","dateModified":"2018-11-24T20:54:42+00:00","description":"MySQL updatable\/Insertable views","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2018\/09\/mysql-updateable-view-example.png","width":289,"height":180},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2018\/09\/25\/mysql-updatable-insertable-views\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"MySQL updatable\/Insertable views"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/86e2eaec293d22fa7a83c539631e106f","name":"Mikael HOUNDEGNON","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a7eeb4be963109ed74e93e6afeaead434866af33be2b30acb0a38a42d30cadb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a7eeb4be963109ed74e93e6afeaead434866af33be2b30acb0a38a42d30cadb6?s=96&d=mm&r=g","caption":"Mikael HOUNDEGNON"},"description":"My name is Mikael HOUNDEGNON. I am an experienced MySQL DBA\/Developer based in the greater Chicago area. You can find out more about me here. I blog here mostly about things I don\u2019t want to forget ? most likely, MySQL Tips. My specialties : MySQL Replication (Master Slave, MultiMaster, Fail over, etc) MySQL Backups MySQL Query Optimization MySQL Performance Tuning MySQL Stored Procedures Storage Engine Tuning Do you have an interesting project idea? Or you just want to chat? Get in touch!","sameAs":["https:\/\/mikaelhoundegnon.wordpress.com\/","https:\/\/x.com\/@HOUNDEGNON_MIKE"],"url":"https:\/\/dbtut.com\/index.php\/author\/mikaelhoundegnon\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/3328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=3328"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/3328\/revisions"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=3328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=3328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=3328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}