{"id":8010,"date":"2019-08-29T20:04:10","date_gmt":"2019-08-30T03:04:10","guid":{"rendered":"http:\/\/www.mysqltutorial.org\/?page_id=8010"},"modified":"2020-04-11T02:01:28","modified_gmt":"2020-04-11T09:01:28","slug":"mysql-alter-view","status":"publish","type":"page","link":"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/","title":{"rendered":"MySQL ALTER VIEW"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn how to use the MySQL <code>ALTER VIEW<\/code> to modify the definition of an existing view.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction to MySQL ALTER VIEW statement<\/h2>\n\n\n\n<p>The MySQL <code>ALTER VIEW<\/code> statement changes the definition of an existing view. The syntax of the <code>ALTER VIEW<\/code> is similar to the <code>CREATE VIEW<\/code> statement:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">ALTER<\/span>\n    &#91;ALGORITHM = {UNDEFINED | <span class=\"hljs-keyword\">MERGE<\/span> | TEMPTABLE}]\n    <span class=\"hljs-keyword\">VIEW<\/span> view_name &#91;(column_list)]\n    <span class=\"hljs-keyword\">AS<\/span> select_statement;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">MySQL ALTER VIEW examples<\/h2>\n\n\n\n<p>See the following tables <code>orders<\/code> and <code>orderdetails<\/code> from the <a href=\"https:\/\/www.mysqltutorial.org\/getting-started-with-mysql\/mysql-sample-database\/\">sample database<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7867\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/orders-orderdetails-table.png\" alt=\"orders orderdetails table\" width=\"424\" height=\"184\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/orders-orderdetails-table.png 424w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/orders-orderdetails-table-200x87.png 200w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">1) ALTER VIEW simple example<\/h3>\n\n\n\n<p>First, <a href=\"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-create-view\/\">create a view<\/a> based on the <code>orders<\/code> and <code>orderdetails<\/code> tables:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">VIEW<\/span> salesOrders <span class=\"hljs-keyword\">AS<\/span>\n    <span class=\"hljs-keyword\">SELECT<\/span> \n        orderNumber, \n        productCode,\n        quantityOrdered, \n        priceEach, \n        <span class=\"hljs-keyword\">status<\/span>\n    <span class=\"hljs-keyword\">FROM<\/span>\n        orders\n    <span class=\"hljs-keyword\">INNER<\/span> <span class=\"hljs-keyword\">JOIN<\/span>\n        orderDetails <span class=\"hljs-keyword\">USING<\/span> (orderNumber);\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Second, <a href=\"https:\/\/www.mysqltutorial.org\/mysql-basics\/mysql-select-from\/\">query data<\/a> from the view <code>salesorders<\/code>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SHOW<\/span> <span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">VIEW<\/span> salesorders;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"715\" height=\"95\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-statement.png\" alt=\"MySQL ALTER VIEW statement\" class=\"wp-image-8011\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-statement.png 715w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-statement-200x27.png 200w\" sizes=\"auto, (max-width: 715px) 100vw, 715px\" \/><\/figure>\n\n\n\n<p>Third, use the <code>ALTER VIEW<\/code> statement to change the <a href=\"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-view-processing-algorithms\/\">processing algorithm of the view<\/a> from <code>UNDEFINED<\/code> to <code>MERGE<\/code> and add <code>customerNumber<\/code> column to the view:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">ALTER<\/span> \n    ALGORITHM=<span class=\"hljs-keyword\">MERGE<\/span>\n<span class=\"hljs-keyword\">VIEW<\/span> salesOrders <span class=\"hljs-keyword\">AS<\/span>\n    <span class=\"hljs-keyword\">SELECT<\/span> \n        orderNumber, \n        customerNumber,\n        productCode,\n        quantityOrdered, \n        priceEach, \n        <span class=\"hljs-keyword\">status<\/span>\n    <span class=\"hljs-keyword\">FROM<\/span>\n        orders\n    <span class=\"hljs-keyword\">INNER<\/span> <span class=\"hljs-keyword\">JOIN<\/span>\n        orderDetails <span class=\"hljs-keyword\">USING<\/span> (orderNumber);    \n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Finally, show the view information to see the effect:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SHOW<\/span> <span class=\"hljs-keyword\">CREATE<\/span> <span class=\"hljs-keyword\">VIEW<\/span> salesorders;\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8012\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-statement-example.png\" alt=\"\" width=\"663\" height=\"97\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-statement-example.png 663w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-statement-example-200x29.png 200w\" sizes=\"auto, (max-width: 663px) 100vw, 663px\" \/><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">2) ALTER VIEW using MySQL Workbench<\/h3>\n\n\n\n<p>Using MySQL Workbench to modify an existing view is more practical. Because you need to see the whole view definition before changing it.<\/p>\n\n\n\n<p>First, open the Views, right-click the view that you want to modify, and select <em>Alter View&#8230;<\/em> menu item:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"398\" height=\"483\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-1.png\" alt=\"MySQL ALTER VIEW with Workbench step 1\" class=\"wp-image-8013\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-1.png 398w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-1-165x200.png 165w\" sizes=\"auto, (max-width: 398px) 100vw, 398px\" \/><\/figure>\n\n\n\n<p>MySQL Workbench will open an editor that displays the view&#8217;s DDL.<\/p>\n\n\n\n<p>Second, change the DDL of the view and click the <em>Apply<\/em> button to confirm the changes. If you want to revert the change, click the <em>Revert<\/em> button:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"753\" height=\"603\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-2.png\" alt=\"MySQL ALTER VIEW with Workbench step 2\" class=\"wp-image-8014\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-2.png 753w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-2-200x160.png 200w\" sizes=\"auto, (max-width: 753px) 100vw, 753px\" \/><\/figure>\n\n\n\n<p>MySQL Workbench opens a confirmation window.<\/p>\n\n\n\n<p>Third, click the <em>Apply<\/em> button to apply the change.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"784\" height=\"592\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-3.png\" alt=\"\" class=\"wp-image-8015\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-3.png 784w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-3-200x151.png 200w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-3-768x580.png 768w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><\/figure>\n\n\n\n<p>Note that MySQL Workbench uses <code><a href=\"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-create-view\/\">CREATE OR REPLACE VIEW<\/a><\/code> statement instead of <code>ALTER VIEW<\/code> statement<\/p>\n\n\n\n<p>Finally, click the <em>Finish<\/em> button to close the window.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"457\" src=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-4.png\" alt=\"MySQL ALTER VIEW with Workbench step 4\" class=\"wp-image-8016\" srcset=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-4.png 640w, https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/MySQL-ALTER-VIEW-with-Workbench-step-4-200x143.png 200w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>In this tutorial, you have learned how to use the MySQL <code>ALTER VIEW<\/code> statement to modify an existing view. In addition, you learned how to use MySQL Workbench to alter a view.<\/p>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful? <\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"8010\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/\"\n\t\t\t\tdata-post-title=\"MySQL ALTER VIEW\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"8010\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/\"\n\t\t\t\tdata-post-title=\"MySQL ALTER VIEW\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you will learn how to use the MySQL ALTER VIEW to modify the definition of an existing view.<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":555,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-8010","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MySQL ALTER VIEW<\/title>\n<meta name=\"description\" content=\"In this tutorial, you will learn how to use the MySQL ALTER VIEW to modify the definition of an existing view.\" \/>\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.mysqltutorial.org\/mysql-views\/mysql-alter-view\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL ALTER VIEW\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you will learn how to use the MySQL ALTER VIEW to modify the definition of an existing view.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/\" \/>\n<meta property=\"og:site_name\" content=\"MySQL Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-11T09:01:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/orders-orderdetails-table.png\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-views\\\/mysql-alter-view\\\/\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-views\\\/mysql-alter-view\\\/\",\"name\":\"MySQL ALTER VIEW\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-views\\\/mysql-alter-view\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-views\\\/mysql-alter-view\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/orders-orderdetails-table.png\",\"datePublished\":\"2019-08-30T03:04:10+00:00\",\"dateModified\":\"2020-04-11T09:01:28+00:00\",\"description\":\"In this tutorial, you will learn how to use the MySQL ALTER VIEW to modify the definition of an existing view.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-views\\\/mysql-alter-view\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-views\\\/mysql-alter-view\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-views\\\/mysql-alter-view\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/orders-orderdetails-table.png\",\"contentUrl\":\"https:\\\/\\\/www.mysqltutorial.org\\\/wp-content\\\/uploads\\\/2019\\\/08\\\/orders-orderdetails-table.png\",\"width\":424,\"height\":184,\"caption\":\"orders orderdetails table\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-views\\\/mysql-alter-view\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL Views\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-views\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"MySQL ALTER VIEW\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\",\"name\":\"MySQL Tutorial\",\"description\":\"A comprehensive MySQL Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mysqltutorial.org\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySQL ALTER VIEW","description":"In this tutorial, you will learn how to use the MySQL ALTER VIEW to modify the definition of an existing view.","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.mysqltutorial.org\/mysql-views\/mysql-alter-view\/","og_locale":"en_US","og_type":"article","og_title":"MySQL ALTER VIEW","og_description":"In this tutorial, you will learn how to use the MySQL ALTER VIEW to modify the definition of an existing view.","og_url":"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/","og_site_name":"MySQL Tutorial","article_modified_time":"2020-04-11T09:01:28+00:00","og_image":[{"url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/orders-orderdetails-table.png","type":"","width":"","height":""}],"twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/","url":"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/","name":"MySQL ALTER VIEW","isPartOf":{"@id":"https:\/\/www.mysqltutorial.org\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/#primaryimage"},"image":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/orders-orderdetails-table.png","datePublished":"2019-08-30T03:04:10+00:00","dateModified":"2020-04-11T09:01:28+00:00","description":"In this tutorial, you will learn how to use the MySQL ALTER VIEW to modify the definition of an existing view.","breadcrumb":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/#primaryimage","url":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/orders-orderdetails-table.png","contentUrl":"https:\/\/www.mysqltutorial.org\/wp-content\/uploads\/2019\/08\/orders-orderdetails-table.png","width":424,"height":184,"caption":"orders orderdetails table"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mysqltutorial.org\/mysql-views\/mysql-alter-view\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mysqltutorial.org\/"},{"@type":"ListItem","position":2,"name":"MySQL Views","item":"https:\/\/www.mysqltutorial.org\/mysql-views\/"},{"@type":"ListItem","position":3,"name":"MySQL ALTER VIEW"}]},{"@type":"WebSite","@id":"https:\/\/www.mysqltutorial.org\/#website","url":"https:\/\/www.mysqltutorial.org\/","name":"MySQL Tutorial","description":"A comprehensive MySQL Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mysqltutorial.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/8010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/comments?post=8010"}],"version-history":[{"count":0,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/8010\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/555"}],"wp:attachment":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/media?parent=8010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}