{"id":6710,"date":"2024-11-14T15:30:12","date_gmt":"2024-11-14T07:30:12","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6710\/"},"modified":"2024-11-14T15:30:12","modified_gmt":"2024-11-14T07:30:12","slug":"%e5%a6%82%e4%bd%95%e9%80%9a%e8%bf%87-mysql-%e5%91%bd%e4%bb%a4%e8%a1%8c%e5%af%bc%e5%87%ba%e6%95%b0%e6%8d%ae%e5%ba%93-ddl-%e4%bb%a3%e7%a0%81%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6710\/","title":{"rendered":"\u5982\u4f55\u901a\u8fc7 MySQL \u547d\u4ee4\u884c\u5bfc\u51fa\u6570\u636e\u5e93 DDL \u4ee3\u7801\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/172975754515605.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u901a\u8fc7 MySQL \u547d\u4ee4\u884c\u5bfc\u51fa\u6570\u636e\u5e93 DDL \u4ee3\u7801\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u901a\u8fc7 MySQL \u547d\u4ee4\u884c\u5bfc\u51fa\u6570\u636e\u5e93 DDL \u4ee3\u7801\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5728  \u547d\u4ee4\u884c\u5bfc\u51fa ddl<\/strong><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong><\/p>\n<p>\u5982\u4f55\u4f7f\u7528 mysql \u547d\u4ee4\u884c\u5bfc\u51fa\u73b0\u6709\u6570\u636e\u5e93\uff08\u4f8b\u5982 redmine\uff09\u7684 ddl\uff08\u6570\u636e\u5b9a\u4e49\u8bed\u8a00\uff09\u4ee3\u7801\uff0c\u5305\u542b\u6570\u636e\u5e93\u521b\u5efa\u8bed\u53e5\u548c\u8868\u521b\u5efa\u8bed\u53e5\uff1f<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<p>\u8981\u4ece mysql \u547d\u4ee4\u884c\u5bfc\u51fa ddl \u4ee3\u7801\uff0c\u53ef\u4ee5\u4f7f\u7528 show create table \u8bed\u53e5\u3002<\/p>\n<pre>show create table table_name;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d table_name \u662f\u8981\u5bfc\u51fa ddl \u4ee3\u7801\u7684\u8868\u7684\u540d\u79f0\u3002<\/p>\n<p><strong>\u793a\u4f8b\uff1a<\/strong><\/p>\n<p>\u8981\u5bfc\u51fa redmine \u6570\u636e\u5e93\u4e2d t \u8868\u7684 ddl\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>show create table t;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u8f93\u51fa\u4e00\u4e2a\u5305\u542b\u4ee5\u4e0b ddl \u4ee3\u7801\u7684\u7ed3\u679c\u96c6\uff1a<\/p>\n<pre>CREATE TABLE t (\n  `id` bigint primary key auto_increment,\n  `name` varchar(64)\n);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u4e2a ddl \u4ee3\u7801\u53ef\u4ee5\u7528\u6765\u91cd\u65b0\u521b\u5efa\u8868 t \u53ca\u5176\u7ed3\u6784\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u901a\u8fc7 MySQL \u547d\u4ee4\u884c\u5bfc\u51fa\u6570\u636e\u5e93 DDL \u4ee3\u7801\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 \u547d\u4ee4\u884c\u5bfc\u51fa ddl \u95ee\u9898\uff1a \u5982\u4f55\u4f7f\u7528 mysql \u547d\u4ee4\u884c\u5bfc\u51fa\u73b0\u6709\u6570\u636e\u5e93\uff08\u4f8b\u5982 redmine\uff09\u7684 ddl\uff08\u6570\u636e\u5b9a\u4e49\u8bed\u8a00\uff09\u4ee3\u7801\uff0c\u5305\u542b\u6570\u636e\u5e93\u521b\u5efa\u8bed\u53e5\u548c\u8868\u521b\u5efa\u8bed\u53e5\uff1f \u89e3\u51b3\u65b9\u6848\uff1a \u8981\u4ece mysql \u547d\u4ee4\u884c\u5bfc\u51fa ddl \u4ee3\u7801\uff0c\u53ef\u4ee5\u4f7f\u7528 show create table \u8bed\u53e5\u3002 show create table table_name; \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d table_name \u662f\u8981\u5bfc\u51fa ddl \u4ee3\u7801\u7684\u8868\u7684\u540d\u79f0\u3002 \u793a\u4f8b\uff1a \u8981\u5bfc\u51fa redmine \u6570\u636e\u5e93\u4e2d t \u8868\u7684 ddl\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a show create table t; \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u5c06\u8f93\u51fa\u4e00\u4e2a\u5305\u542b\u4ee5\u4e0b ddl \u4ee3\u7801\u7684\u7ed3\u679c\u96c6\uff1a CREATE TABLE t ( `id` bigint primary key auto_increment, `name` varchar(64) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-6710","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=6710"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6710\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}