{"id":186350,"date":"2024-11-11T05:11:17","date_gmt":"2024-11-10T21:11:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/186350\/"},"modified":"2024-11-11T05:11:18","modified_gmt":"2024-11-10T21:11:18","slug":"%e6%95%b8%e6%93%9a%e5%ba%ab%e5%ad%98%e5%84%b2%e6%94%af%e6%8c%81%e7%9a%84%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%e6%9c%89%e5%93%aa%e4%ba%9b%ef%bc%9f%ef%bc%88%e6%95%b8%e6%93%9a%e5%ba%ab%e8%83%bd%e5%ad%98","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/186350\/","title":{"rendered":"\u6578\u64da\u5eab\u5b58\u5132\u652f\u6301\u7684\u6578\u64da\u985e\u578b\u6709\u54ea\u4e9b\uff1f\uff08\u6578\u64da\u5eab\u80fd\u5b58\u54ea\u4e9b\u6578\u64da\u985e\u578b\uff09"},"content":{"rendered":"<h1 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e5%ad%98%e5%84%b2%e6%94%af%e6%8c%81%e7%9a%84%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b%e6%9c%89%e5%93%aa%e4%ba%9b%ef%bc%9f%ef%bc%88%e6%95%b8%e6%93%9a%e5%ba%ab%e8%83%bd%e5%ad%98-bLgiiBJKWJ\">\u6578\u64da\u5eab\u5b58\u5132\u652f\u6301\u7684\u6578\u64da\u985e\u578b\u6709\u54ea\u4e9b\uff1f\uff08\u6578\u64da\u5eab\u80fd\u5b58\u54ea\u4e9b\u6578\u64da\u985e\u578b\uff09<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u64da\u9a45\u52d5\u7684\u4e16\u754c\u4e2d\uff0c\u6578\u64da\u5eab\u626e\u6f14\u8457\u81f3\u95dc\u91cd\u8981\u7684\u89d2\u8272\u3002\u7121\u8ad6\u662f\u4f01\u696d\u7684\u5ba2\u6236\u8cc7\u6599\u3001\u4ea4\u6613\u8a18\u9304\uff0c\u9084\u662f\u7db2\u7ad9\u7684\u7528\u6236\u751f\u6210\u5167\u5bb9\uff0c\u6578\u64da\u5eab\u90fd\u80fd\u6709\u6548\u5730\u5b58\u5132\u548c\u7ba1\u7406\u9019\u4e9b\u4fe1\u606f\u3002\u4e86\u89e3\u6578\u64da\u5eab\u652f\u6301\u7684\u6578\u64da\u985e\u578b\u5c0d\u65bc\u8a2d\u8a08\u548c\u512a\u5316\u6578\u64da\u5eab\u7d50\u69cb\u81f3\u95dc\u91cd\u8981\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u5e38\u898b\u7684\u6578\u64da\u5eab\u6578\u64da\u985e\u578b\u53ca\u5176\u61c9\u7528\u3002<\/p>\n<h2 id=\"%e5%9f%ba%e6%9c%ac%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b-bLgiiBJKWJ\">\u57fa\u672c\u6578\u64da\u985e\u578b<\/h2>\n<p>\u6578\u64da\u5eab\u4e2d\u7684\u57fa\u672c\u6578\u64da\u985e\u578b\u901a\u5e38\u5305\u62ec\u4ee5\u4e0b\u5e7e\u7a2e\uff1a<\/p>\n<ul>\n<li><strong>\u6574\u6578\uff08Integer\uff09<\/strong>: \u7528\u65bc\u5b58\u5132\u6574\u6578\u503c\uff0c\u901a\u5e38\u5206\u70ba\u4e0d\u540c\u7684\u5927\u5c0f\uff0c\u5982 TINYINT\u3001SMALLINT\u3001MEDIUMINT \u548c INT\u3002\u6574\u6578\u985e\u578b\u9069\u5408\u5b58\u5132\u8a08\u6578\u3001ID \u7b49\u6578\u64da\u3002<\/li>\n<li><strong>\u6d6e\u9ede\u6578\uff08Float\/Double\uff09<\/strong>: \u7528\u65bc\u5b58\u5132\u5e36\u5c0f\u6578\u7684\u6578\u5b57\u3002FLOAT \u548c DOUBLE \u985e\u578b\u9069\u5408\u9700\u8981\u9ad8\u7cbe\u5ea6\u7684\u8a08\u7b97\uff0c\u5982\u79d1\u5b78\u8a08\u7b97\u6216\u8ca1\u52d9\u6578\u64da\u3002<\/li>\n<li><strong>\u5b57\u7b26\uff08Char\/Varchar\uff09<\/strong>: CHAR \u7528\u65bc\u5b58\u5132\u56fa\u5b9a\u9577\u5ea6\u7684\u5b57\u7b26\u4e32\uff0c\u800c VARCHAR \u5247\u7528\u65bc\u53ef\u8b8a\u9577\u5ea6\u7684\u5b57\u7b26\u4e32\u3002\u9019\u4e9b\u985e\u578b\u9069\u5408\u5b58\u5132\u59d3\u540d\u3001\u5730\u5740\u7b49\u6587\u672c\u4fe1\u606f\u3002<\/li>\n<li><strong>\u5e03\u723e\uff08Boolean\uff09<\/strong>: \u7528\u65bc\u5b58\u5132\u771f\uff08TRUE\uff09\u6216\u5047\uff08FALSE\uff09\u503c\uff0c\u5e38\u7528\u65bc\u8868\u793a\u958b\u95dc\u72c0\u614b\u6216\u689d\u4ef6\u5224\u65b7\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%97%a5%e6%9c%9f%e5%92%8c%e6%99%82%e9%96%93%e9%a1%9e%e5%9e%8b-bLgiiBJKWJ\">\u65e5\u671f\u548c\u6642\u9593\u985e\u578b<\/h2>\n<p>\u65e5\u671f\u548c\u6642\u9593\u985e\u578b\u5728\u6578\u64da\u5eab\u4e2d\u4e5f\u975e\u5e38\u91cd\u8981\uff0c\u5e38\u898b\u7684\u985e\u578b\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>DATE<\/strong>: \u7528\u65bc\u5b58\u5132\u65e5\u671f\uff0c\u683c\u5f0f\u70ba YYYY-MM-DD\u3002<\/li>\n<li><strong>TIME<\/strong>: \u7528\u65bc\u5b58\u5132\u6642\u9593\uff0c\u683c\u5f0f\u70ba HH:MM:SS\u3002<\/li>\n<li><strong>DATETIME<\/strong>: \u7d50\u5408\u65e5\u671f\u548c\u6642\u9593\uff0c\u683c\u5f0f\u70ba YYYY-MM-DD HH:MM:SS\u3002<\/li>\n<li><strong>TIMESTAMP<\/strong>: \u7528\u65bc\u5b58\u5132\u81ea 1970 \u5e74 1 \u6708 1 \u65e5\u4ee5\u4f86\u7684\u79d2\u6578\uff0c\u5e38\u7528\u65bc\u8a18\u9304\u4e8b\u4ef6\u7684\u767c\u751f\u6642\u9593\u3002<\/li>\n<\/ul>\n<h2 id=\"%e8%a4%87%e9%9b%9c%e6%95%b8%e6%93%9a%e9%a1%9e%e5%9e%8b-bLgiiBJKWJ\">\u8907\u96dc\u6578\u64da\u985e\u578b<\/h2>\n<p>\u9664\u4e86\u57fa\u672c\u6578\u64da\u985e\u578b\uff0c\u8a31\u591a\u73fe\u4ee3\u6578\u64da\u5eab\u9084\u652f\u6301\u8907\u96dc\u6578\u64da\u985e\u578b\uff1a<\/p>\n<ul>\n<li><strong>JSON<\/strong>: \u7528\u65bc\u5b58\u5132\u7d50\u69cb\u5316\u6578\u64da\uff0c\u7279\u5225\u9069\u5408\u9700\u8981\u9748\u6d3b\u7d50\u69cb\u7684\u61c9\u7528\uff0c\u5982\u7db2\u9801\u61c9\u7528\u548c API\u3002<\/li>\n<li><strong>XML<\/strong>: \u7528\u65bc\u5b58\u5132\u53ef\u64f4\u5c55\u6a19\u8a18\u8a9e\u8a00\u683c\u5f0f\u7684\u6578\u64da\uff0c\u9069\u5408\u9700\u8981\u6a19\u8a18\u548c\u7d50\u69cb\u5316\u7684\u6578\u64da\u3002<\/li>\n<li><strong>BLOB\uff08Binary Large Object\uff09<\/strong>: \u7528\u65bc\u5b58\u5132\u4e8c\u9032\u5236\u6578\u64da\uff0c\u5982\u5716\u50cf\u3001\u97f3\u983b\u548c\u8996\u983b\u6587\u4ef6\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%95%b8%e6%93%9a%e5%ba%ab%e8%a8%ad%e8%a8%88%e8%80%83%e9%87%8f-bLgiiBJKWJ\">\u6578\u64da\u5eab\u8a2d\u8a08\u8003\u91cf<\/h2>\n<p>\u5728\u8a2d\u8a08\u6578\u64da\u5eab\u6642\uff0c\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u985e\u578b\u81f3\u95dc\u91cd\u8981\u3002\u9078\u64c7\u4e0d\u7576\u53ef\u80fd\u5c0e\u81f4\u6027\u80fd\u554f\u984c\u6216\u6578\u64da\u4e0d\u4e00\u81f4\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u904e\u5927\u7684\u6578\u64da\u985e\u578b\u6703\u6d6a\u8cbb\u5b58\u5132\u7a7a\u9593\uff0c\u800c\u4f7f\u7528\u904e\u5c0f\u7684\u6578\u64da\u985e\u578b\u5247\u53ef\u80fd\u5c0e\u81f4\u6578\u64da\u6ea2\u51fa\u3002\u56e0\u6b64\uff0c\u4e86\u89e3\u6bcf\u7a2e\u6578\u64da\u985e\u578b\u7684\u7279\u6027\u548c\u9650\u5236\u662f\u8a2d\u8a08\u9ad8\u6548\u6578\u64da\u5eab\u7684\u57fa\u790e\u3002<\/p>\n<h2 id=\"%e7%b5%90%e8%ab%96-bLgiiBJKWJ\">\u7d50\u8ad6<\/h2>\n<p>\u6578\u64da\u5eab\u652f\u6301\u591a\u7a2e\u6578\u64da\u985e\u578b\uff0c\u5305\u62ec\u57fa\u672c\u6578\u64da\u985e\u578b\u3001\u65e5\u671f\u548c\u6642\u9593\u985e\u578b\u4ee5\u53ca\u8907\u96dc\u6578\u64da\u985e\u578b\u3002\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u985e\u578b\u4e0d\u50c5\u80fd\u63d0\u9ad8\u6578\u64da\u5eab\u7684\u6027\u80fd\uff0c\u9084\u80fd\u78ba\u4fdd\u6578\u64da\u7684\u5b8c\u6574\u6027\u548c\u4e00\u81f4\u6027\u3002\u5c0d\u65bc\u9700\u8981\u9ad8\u6548\u6578\u64da\u5b58\u5132\u548c\u7ba1\u7406\u7684\u4f01\u696d\u4f86\u8aaa\uff0c\u4e86\u89e3\u9019\u4e9b\u6578\u64da\u985e\u578b\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u53ef\u9760\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u6eff\u8db3\u4e0d\u540c\u9700\u6c42\u7684\u5ba2\u6236\u3002\u7121\u8ad6\u662f <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u9084\u662f\u5176\u4ed6\u670d\u52d9\uff0c\u6211\u5011\u90fd\u80fd\u70ba\u60a8\u63d0\u4f9b\u652f\u6301\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3\u6578\u64da\u5eab\u5b58\u5132\u652f\u6301\u7684\u6578\u64da\u985e\u578b\uff0c\u5305\u62ec\u6574\u6578\u3001\u6d6e\u9ede\u6578\u3001\u5b57\u7b26\u4e32\u3001\u65e5\u671f\u3001\u5e03\u723e\u503c\u7b49\uff0c\u52a9\u60a8\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u683c\u5f0f\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-186350","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/186350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=186350"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/186350\/revisions"}],"predecessor-version":[{"id":186351,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/186350\/revisions\/186351"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=186350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=186350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=186350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}