{"id":2059,"date":"2020-07-29T23:29:52","date_gmt":"2020-07-29T15:29:52","guid":{"rendered":"http:\/\/39.97.231.10\/?p=2059"},"modified":"2020-07-29T23:29:52","modified_gmt":"2020-07-29T15:29:52","slug":"mysql%e5%8f%82%e6%95%b0%e8%a7%a3%e6%9e%90sql_quote_show_create","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=2059","title":{"rendered":"MySQL\u53c2\u6570\u89e3\u6790sql_quote_show_create"},"content":{"rendered":"<div class=\\\"blog_content\\\">\n<div class=\\\"blog_detail\\\">\n<div>\nMySQL\u6267\u884cshow create table\u548cshow create database\u547d\u4ee4\uff0c\u663e\u793a\u5efa\u8868\u6216\u8005\u5efa\u5e93\u8bed\u53e5\u65f6\uff0c\u4f1a\u5728\u8868\u540d\u3001\u5e93\u540d\u3001\u5b57\u6bb5\u540d\u7684\u4e24\u8fb9\u52a0\u4e0a\u5f15\u53f7\uff0c\u6bd4\u5982 `id`\uff0c\u53c2\u6570 sql_quote_show_create \u8bbe\u7f6e\u4e3aOFF\u65f6\uff0c\u53ef\u4ee5\u5c06\u5e93\u540d\u3001\u8868\u540d\u3001\u5b57\u6bb5\u540d\u4e24\u4fa7\u7684\u5f15\u53f7\u53bb\u9664\u3002<br \/>\n<strong>sql_quote_show_create\uff1a<\/strong><\/p>\n<ul>\n<li>\u4f5c\u7528\u8303\u56f4\uff1a\u5168\u5c40\uff0c\u4f1a\u8bdd\u7ea7<\/li>\n<li>\u52a8\u6001\u4fee\u6539\uff1a\u662f<\/li>\n<li>\u53d6\u503c\u8303\u56f4\uff1aON\uff0cOFF<\/li>\n<li>\u9ed8\u8ba4\u503c\uff1aON<\/li>\n<\/ul>\n<p><strong>\u793a\u4f8b\uff1a<\/strong><br \/>\n\uff081\uff09sql_quote_show_create=ON\uff0c\u6709\u5f15\u53f7<\/p>\n<pre><code>mysql&gt; show create table tb\\\\G\n*************************** 1. row ***************************\n       Table: tb\nCreate Table: CREATE TABLE `tb` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `username` varchar(50) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `idx_username` (`username`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\n1 row in set (0.00 sec)\n<\/code><\/pre>\n<p>\uff082\uff09sql_quote_show_create=OFF\uff0c\u65e0\u5f15\u53f7<\/p>\n<pre><code>mysql&gt; show create table tb\\\\G\n*************************** 1. row ***************************\n       Table: tb\nCreate Table: CREATE TABLE tb (\n  id int(11) NOT NULL AUTO_INCREMENT,\n  username varchar(50) DEFAULT NULL,\n  PRIMARY KEY (id),\n  KEY idx_username (username)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\n1 row in set (0.00 sec)\n<\/code><\/pre>\n<p>\u5728sql_quote_show_create=OFF\u65f6\uff0c\u6709\u65f6\u5019\u4e5f\u6709\u53ef\u80fd\u51fa\u73b0\u5f15\u53f7\uff0c\u6bd4\u5982\u8868\u540d\uff0c\u5e93\u540d\u6216\u8005\u5b57\u6bb5\u540d\u4f7f\u7528\u4e86MySQL\u7684\u5173\u952e\u5b57\u65f6\uff0c\u4e5f\u4f1a\u52a0\u4e0a\u5f15\u53f7\uff0c\u5982\u4e0b\u6240\u793a\uff0c\u5b57\u6bb5create\uff0c\u7531\u4e8e\u662fMySQL\u5173\u952e\u5b57\uff0c\u4e24\u8fb9\u52a0\u4e0a\u4e86\u5f15\u53f7\uff0c\u800cage\u6ca1\u6709\u52a0\u5f15\u53f7\u3002<\/p>\n<pre><code>mysql&gt; show create table tb1\\\\G\n*************************** 1. row ***************************\n       Table: tb1\nCreate Table: CREATE TABLE tb1 (\n  `create` varchar(50) DEFAULT NULL,\n  age int(11) DEFAULT NULL\n) ENGINE=InnoDB DEFAULT CHARSET=utf8\n1 row in set (0.00 sec)<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>MySQL\u6267\u884cshow create table\u548cshow create database\u547d\u4ee4\uff0c\u663e\u793a\u5efa\u8868\u6216\u8005\u5efa &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=2059\"> <span class=\"screen-reader-text\">MySQL\u53c2\u6570\u89e3\u6790sql_quote_show_create<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[90,88],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"MySQL\u6267\u884cshow create table\u548cshow create database\u547d\u4ee4\uff0c\u663e\u793a\u5efa\u8868\u6216\u8005\u5efa&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/2059"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2059"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/2059\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2059"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}