{"id":6872,"date":"2024-11-14T11:50:00","date_gmt":"2024-11-14T03:50:00","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6872\/"},"modified":"2024-11-14T11:50:00","modified_gmt":"2024-11-14T03:50:00","slug":"%e5%a6%82%e4%bd%95%e5%88%a9%e7%94%a8mysql%e5%ad%98%e5%82%a8%e5%92%8c%e7%ae%a1%e7%90%86%e5%bf%ab%e9%80%92%e8%bf%90%e8%be%93%e8%bd%a8%e8%bf%b9%e4%bf%a1%e6%81%af%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6872\/","title":{"rendered":"\u5982\u4f55\u5229\u7528MySQL\u5b58\u50a8\u548c\u7ba1\u7406\u5feb\u9012\u8fd0\u8f93\u8f68\u8ff9\u4fe1\u606f\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173000340387719.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5229\u7528MySQL\u5b58\u50a8\u548c\u7ba1\u7406\u5feb\u9012\u8fd0\u8f93\u8f68\u8ff9\u4fe1\u606f\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5229\u7528MySQL\u5b58\u50a8\u548c\u7ba1\u7406\u5feb\u9012\u8fd0\u8f93\u8f68\u8ff9\u4fe1\u606f\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong> \u4e2d\u5feb\u9012\u8fd0\u8f93\u8f68\u8ff9\u5b58\u50a8\u65b9\u5f0f<\/strong><\/p>\n<p>\u5b58\u50a8\u5feb\u9012\u8fd0\u8f93\u8f68\u8ff9\u65f6\uff0c\u6211\u4eec\u9996\u5148\u8003\u8651\u5c06\u56fa\u5b9a\u7684\u4fe1\u606f\uff08\u5982\u5feb\u9012\u516c\u53f8\u540d\u79f0\u3001\u4ee3\u7801\u548c\u5355\u53f7\uff09\u5b58\u50a8\u5728\u4e13\u5c5e\u5b57\u6bb5\u4e2d\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u4fe1\u606f\u901a\u5e38\u9700\u8981\u88ab\u68c0\u7d22\u3002\u4f8b\u5982\uff1a<\/p>\n<pre>create table expresses (\n  express_company varchar(255) not null,\n  express_code varchar(255) not null,\n  express_number varchar(255) not null,\n  ...\n);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5bf9\u4e8e\u52a8\u6001\u7684\u4fe1\u606f\uff0c\u5982\u5feb\u9012\u9014\u5f84\u548c\u4e2d\u8f6c\u4fe1\u606f\uff0c\u7531\u4e8e\u5176\u4e0d\u5e38\u7528\u6765\u67e5\u8be2\uff0c\u6211\u4eec\u53ef\u4ee5\u8003\u8651\u5c06\u5176\u5b58\u50a8\u4e3a json \u683c\u5f0f\u3002\u8fd9\u5c06\u5141\u8bb8\u6211\u4eec\u7075\u6d3b\u5730\u5b58\u50a8\u548c\u68c0\u7d22\u8fd9\u4e9b\u4fe1\u606f\u3002\u4f8b\u5982\uff1a<\/p>\n<pre>alter table expresses\nadd column trajectory json;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728 json \u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u5b58\u50a8\u4efb\u4f55\u76f8\u5173\u4fe1\u606f\uff0c\u5982\uff1a<\/p>\n<pre>{\n  \"waypoints\": [\n    {\n      \"location\": \"\u6df1\u5733\",\n      \"time\": \"2023-03-08 10:00:00\"\n    },\n    {\n      \"location\": \"\u5e7f\u5dde\",\n      \"time\": \"2023-03-09 18:00:00\"\n    }\n  ],\n  \"transits\": [\n    {\n      \"from\": \"\u6df1\u5733\u8f6c\u8fd0\u4e2d\u5fc3\",\n      \"to\": \"\u5e7f\u5dde\u5206\u62e8\u4e2d\u5fc3\"\n    }\n  ]\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u65e2\u7075\u6d3b\u53c8\u65b9\u4fbf\u68c0\u7d22\uff0c\u53ef\u4ee5\u6ee1\u8db3\u6211\u4eec\u5b58\u50a8\u5feb\u9012\u8fd0\u8f93\u8f68\u8ff9\u7684\u9700\u8981\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5229\u7528MySQL\u5b58\u50a8\u548c\u7ba1\u7406\u5feb\u9012\u8fd0\u8f93\u8f68\u8ff9\u4fe1\u606f\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>\u4e2d\u5feb\u9012\u8fd0\u8f93\u8f68\u8ff9\u5b58\u50a8\u65b9\u5f0f \u5b58\u50a8\u5feb\u9012\u8fd0\u8f93\u8f68\u8ff9\u65f6\uff0c\u6211\u4eec\u9996\u5148\u8003\u8651\u5c06\u56fa\u5b9a\u7684\u4fe1\u606f\uff08\u5982\u5feb\u9012\u516c\u53f8\u540d\u79f0\u3001\u4ee3\u7801\u548c\u5355\u53f7\uff09\u5b58\u50a8\u5728\u4e13\u5c5e\u5b57\u6bb5\u4e2d\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u4fe1\u606f\u901a\u5e38\u9700\u8981\u88ab\u68c0\u7d22\u3002\u4f8b\u5982\uff1a create table expresses ( express_company varchar(255) not null, express_code varchar(255) not null, express_number varchar(255) not null, &#8230; ); \u767b\u5f55\u540e\u590d\u5236 \u5bf9\u4e8e\u52a8\u6001\u7684\u4fe1\u606f\uff0c\u5982\u5feb\u9012\u9014\u5f84\u548c\u4e2d\u8f6c\u4fe1\u606f\uff0c\u7531\u4e8e\u5176\u4e0d\u5e38\u7528\u6765\u67e5\u8be2\uff0c\u6211\u4eec\u53ef\u4ee5\u8003\u8651\u5c06\u5176\u5b58\u50a8\u4e3a json \u683c\u5f0f\u3002\u8fd9\u5c06\u5141\u8bb8\u6211\u4eec\u7075\u6d3b\u5730\u5b58\u50a8\u548c\u68c0\u7d22\u8fd9\u4e9b\u4fe1\u606f\u3002\u4f8b\u5982\uff1a alter table expresses add column trajectory json; \u767b\u5f55\u540e\u590d\u5236 \u5728 json \u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u5b58\u50a8\u4efb\u4f55\u76f8\u5173\u4fe1\u606f\uff0c\u5982\uff1a { &#8220;waypoints&#8221;: [ { &#8220;location&#8221;: &#8220;\u6df1\u5733&#8221;, &#8220;time&#8221;: &#8220;2023-03-08 10:00:00&#8221; }, { &#8220;location&#8221;: &#8220;\u5e7f\u5dde&#8221;, &#8220;time&#8221;: &#8220;2023-03-09 18:00:00&#8221; } ], &#8220;transits&#8221;: [ [&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-6872","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6872","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=6872"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6872\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}