{"id":3581,"date":"2022-03-11T21:08:56","date_gmt":"2022-03-11T13:08:56","guid":{"rendered":"https:\/\/blog.iyatt.com\/?p=3581"},"modified":"2024-05-05T14:19:16","modified_gmt":"2024-05-05T06:19:16","slug":"sqlite3-%e6%95%b0%e6%8d%ae%e5%ba%93%e5%85%a5%e9%97%a8","status":"publish","type":"post","link":"https:\/\/blog.iyatt.com\/?p=3581","title":{"rendered":"SQLite3 \u6570\u636e\u5e93\u5165\u95e8"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title ez-toc-toggle\" style=\"cursor:pointer\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blog.iyatt.com\/?p=3581\/#%E7%AE%80%E4%BB%8B\" >\u7b80\u4ecb<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blog.iyatt.com\/?p=3581\/#%E5%AE%89%E8%A3%85\" >\u5b89\u88c5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blog.iyatt.com\/?p=3581\/#%E6%BC%94%E7%A4%BA%E7%8E%AF%E5%A2%83\" >\u6f14\u793a\u73af\u5883<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/blog.iyatt.com\/?p=3581\/#SQLite3_%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E5%8F%8A%E8%AF%AD%E5%8F%A5\" >SQLite3 \u5e38\u7528\u547d\u4ee4\u53ca\u8bed\u53e5<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/blog.iyatt.com\/?p=3581\/#C_%E8%AF%AD%E8%A8%80%E5%BC%80%E5%8F%91\" >C \u8bed\u8a00\u5f00\u53d1<\/a><\/li><\/ul><\/nav><\/div>\n\n<p>\u53d1\u5e03\u4e8e\uff1a<a href=\"http:\/\/blog.iyatt.com\" target=\"_blank\" rel=\"noreferrer noopener\">blog.iyatt.com<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E7%AE%80%E4%BB%8B\"><\/span>\u7b80\u4ecb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>SQLite \u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u7684\u5f00\u6e90\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\uff0c\u4f7f\u7528\u65b9\u4fbf\uff0c\u6027\u80fd\u51fa\u4f17\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u6d88\u8d39\u7535\u5b50\u3001\u533b\u7597\u3001\u5de5\u4e1a\u63a7\u5236\u548c\u519b\u4e8b\u7b49\u9886\u57df\u3002SQLite \u5177\u6709\u4ee5\u4e0b\u7279\u70b9\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u6027\u80fd\uff1aSQLite \u5bf9\u6570\u636e\u5e93\u7684\u8bbf\u95ee\u6027\u80fd\u5f88\u9ad8\uff0c\u5176\u8fd0\u884c\u901f\u5ea6\u6bd4 MySQL \u7b49\u5f00\u6e90\u6570\u636e\u5e93\u8981\u5feb\u5f88\u591a\u3002<\/li><li>\u4f53\u79ef\uff1a\u975e\u5e38\u5c0f\u5de7\uff0c\u6700\u4f4e\u53ea\u9700\u8981\u51e0\u767eKB\u7684\u5185\u5b58\u5c31\u53ef\u4ee5\u8fd0\u884c\u3002<\/li><li>\u53ef\u79fb\u690d\u6027\uff1a\u652f\u6301 32 \u4f4d\u548c 64 \u4f4d\u4f53\u7cfb\u7684\u786c\u4ef6\u5e73\u53f0\uff0c\u4e5f\u80fd\u5728 Windows\u3001Linux\u3001BSD\u3001Mac OS \u548c Solaries \u7b49\u5e73\u53f0\u4e0a\u8fd0\u884c\u3002<\/li><li>\u7a33\u5b9a\u6027\uff1a\u652f\u6301 ACID \u7279\u6027\uff0c\u5373\u539f\u5b50\u6027\u3001\u4e00\u81f4\u6027\u3001\u9694\u79bb\u6027\u548c\u6301\u4e45\u6027\u3002<\/li><li>SQL \u652f\u6301\uff1a\u652f\u6301 ANSI SQL92 \u4e2d\u7684\u5927\u591a\u6570\u6807\u51c6\uff0c\u63d0\u4f9b\u4e86\u5bf9\u5b50\u67e5\u8be2\u3001\u89c6\u56fe\u548c\u89e6\u53d1\u5668\u673a\u5236\u7684\u652f\u6301\u3002<\/li><li>\u63a5\u53e3\uff1a\u4e3a C\u3001Java\u3001PHP\u3001Python\u3001Tcl \u7b49\u591a\u79cd\u8bed\u8a00\u63d0\u4f9b\u4e86 API \u63a5\u53e3\u3002<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2021\/05\/%E5%B1%8F%E5%B9%95%E6%88%AA%E5%9B%BE-2021-05-04-150539.png\" alt=\"\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>\u63a5\u53e3\uff1a\u63a5\u53e3\u7531 SQLite C API \u51fd\u6570\u7ec4\u6210\u3002\u6240\u6709\u7684\u5e94\u7528\u7a0b\u5e8f\u90fd\u5fc5\u987b\u901a\u8fc7\u63a5\u53e3\u8bbf\u95ee SQLite \u6570\u636e\u5e93\u3002<\/li><li>\u7f16\u8bd1\u5668\uff1a\u7f16\u8bd1\u5668\u7531\u8bcd\u6cd5\u5206\u6790\u3001\u8bed\u6cd5\u5206\u6790\u548c\u4e2d\u95f4\u4ee3\u7801\u751f\u6210 3 \u4e2a\u6a21\u5757\u7ec4\u6210\u3002\u5176\u4e2d\uff0c\u8bcd\u6cd5\u5206\u6790\u6a21\u5757\u548c\u8bed\u6cd5\u5206\u6790\u6a21\u5757\u8d1f\u8d23\u68c0\u67e5 SQL \u8bed\u53e5\u7684\u8bed\u6cd5\uff0c\u7136\u540e\u628a\u751f\u6210\u7684\u8bed\u6cd5\u6811\u4f20\u9012\u7ed9\u4e2d\u95f4\u4ee3\u7801\u751f\u6210\u6a21\u5757\u3002\u4e2d\u95f4\u4ee3\u7801\u751f\u6210\u6a21\u5757\u8d1f\u8d23\u751f\u6210 SQLite \u5f15\u64ce\u53ef\u4ee5\u8bc6\u522b\u7684\u4e2d\u95f4\u4ee3\u7801\u3002<\/li><li>\u6570\u636e\u5e93\u5f15\u64ce\uff1a\u6570\u636e\u5e93\u5f15\u64ce\u662f SQlite \u7684\u6838\u5fc3\uff0c\u8d1f\u8d23\u8fd0\u884c\u4e2d\u95f4\u4ee3\u7801\uff0c\u6307\u6325\u6570\u636e\u5e93\u7684\u5177\u4f53\u64cd\u4f5c\u3002<\/li><li>\u540e\u53f0\uff1a\u540e\u53f0\u7531 B \u6811\u3001\u9875\u7f13\u51b2\u548c\u7cfb\u7edf\u8c03\u7528 3 \u4e2a\u6a21\u5757\u7ec4\u6210\u3002\u5176\u4e2d\uff0cB\u6a21\u5757\u8d1f\u8d23\u7ef4\u62a4\u7d22\u5f15\uff0c\u9875\u7f13\u51b2\u8d1f\u8d23\u9875\u9762\u6570\u636e\u7684\u4f20\u8f93\uff0c\u7cfb\u7edf\u8c03\u7528\u8d1f\u8d23\u548c\u64cd\u4f5c\u7cfb\u7edf\u4ea4\u4e92\uff0c\u6700\u7ec8\u5b9e\u73b0\u6570\u636e\u5e93\u7684\u8bbf\u95ee\u3002<\/li><\/ul>\n\n\n\n<p>SQLite \u652f\u6301\u7684\u57fa\u672c\u6570\u636e\u7c7b\u578b\u4e3b\u8981\u6709\uff1aNULL\u3001NUMERIC\u3001INTEGER\u3001REAL \u548c TEXT\u3002SQLite \u4f1a\u81ea\u52a8\u628a\u5176\u5b83\u6570\u636e\u7c7b\u578b\u8f6c\u6362\u6210\u4ee5\u4e0a 5 \u7c7b\u57fa\u672c\u6570\u636e\u7c7b\u578b\uff0c\u8f6c\u6362\u89c4\u5219\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>NULL<\/td><td>\u503c\u662f\u4e00\u4e2a NULL \u503c\u3002<\/td><\/tr><tr><td>INTEGER<\/td><td>\u503c\u662f\u4e00\u4e2a\u5e26\u7b26\u53f7\u7684\u6574\u6570\uff0c\u6839\u636e\u503c\u7684\u5927\u5c0f\u5b58\u50a8\u5728 1\u30012\u30013\u30014\u30016 \u6216 8 \u5b57\u8282\u4e2d\u3002<\/td><\/tr><tr><td>REAL<\/td><td>\u503c\u662f\u4e00\u4e2a\u6d6e\u70b9\u503c\uff0c\u5b58\u50a8\u4e3a 8 \u5b57\u8282\u7684 IEEE \u6d6e\u70b9\u6570\u5b57\u3002<\/td><\/tr><tr><td>TEXT<\/td><td>\u503c\u662f\u4e00\u4e2a\u6587\u672c\u5b57\u7b26\u4e32\uff0c\u4f7f\u7528\u6570\u636e\u5e93\u7f16\u7801\uff08UTF-8\u3001UTF-16BE \u6216 UTF-16LE\uff09\u5b58\u50a8\u3002<\/td><\/tr><tr><td>BLOB<\/td><td>\u503c\u662f\u4e00\u4e2a blob \u6570\u636e\uff0c\u5b8c\u5168\u6839\u636e\u5b83\u7684\u8f93\u5165\u5b58\u50a8\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u5b98\u7f51\uff1a<a href=\"https:\/\/www.sqlite.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.sqlite.org\/<\/a><\/p>\n\n\n\n<p>\u9879\u76ee\u5730\u5740\uff1a<a href=\"https:\/\/github.com\/sqlite\/sqlite\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/sqlite\/sqlite<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E5%AE%89%E8%A3%85\"><\/span>\u5b89\u88c5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Debian \u7cfb Linux<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install -y sqlite3 libsqlite3-dev<\/pre>\n\n\n\n<p>Windows \u5728 msys2 \u73af\u5883\u4e2d\u5b89\u88c5<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">pacman -S mingw64\/mingw-w64-x86_64-sqlite3<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"%E6%BC%94%E7%A4%BA%E7%8E%AF%E5%A2%83\"><\/span>\u6f14\u793a\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Windows 11 \u4e13\u4e1a\u5de5\u4f5c\u7ad9\u7248 21H2<\/p>\n\n\n\n<p><a href=\"https:\/\/blog.iyatt.com\/?p=3541\" target=\"_blank\" rel=\"noreferrer noopener\">msys2<\/a>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>GNU gcc 11.2.0<\/li><li>cmake 3.22.3<\/li><li>GNU make 4.3<\/li><li>sqlite 3.38.0 2022-02-22<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"SQLite3_%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E5%8F%8A%E8%AF%AD%E5%8F%A5\"><\/span>SQLite3 \u5e38\u7528\u547d\u4ee4\u53ca\u8bed\u53e5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>\u6ce8\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>SQLite3 \u8bed\u53e5\u4e0d\u533a\u5206\u5927\u5c0f\u5199\uff0c\u4e0d\u8fc7\u4e00\u822c\u8bed\u53e5\u90fd\u662f\u5927\u5199\uff0c\u547d\u4ee4\u5bf9\u5927\u5c0f\u5199\u654f\u611f<\/li><li>SQLite3 \u6bcf\u4e2a\u8bed\u53e5\u4ee5\u534a\u89d2\u5206\u53f7\u7ed3\u675f<\/li><li>\u7ec8\u7aef\u6267\u884c sqlite3 \u53ef\u4ee5\u8fdb\u5165\u4ea4\u4e92\u73af\u5883\uff0c\u5728\u4ea4\u4e92\u73af\u5883\u6267\u884c <strong>.help<\/strong> \u53ef\u4ee5\u67e5\u770b\u547d\u4ee4\u8bf4\u660e\uff0c\u6267\u884c <strong>.q<\/strong> \u9000\u51fa\u4ea4\u4e92\u73af\u5883<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"715\" height=\"226\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-86.png\" alt=\"\" class=\"wp-image-3585 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-86.png 715w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-86-300x95.png 300w\" data-sizes=\"(max-width: 715px) 100vw, 715px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 715px; --smush-placeholder-aspect-ratio: 715\/226;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"677\" height=\"79\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-87.png\" alt=\"\" class=\"wp-image-3586 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-87.png 677w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-87-300x35.png 300w\" data-sizes=\"(max-width: 677px) 100vw, 677px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 677px; --smush-placeholder-aspect-ratio: 677\/79;\" \/><\/figure>\n\n\n\n<p>\uff081\uff09\u65b0\u5efa\u6216\u6253\u5f00\u4e00\u4e2a\u6570\u636e\u5e93<\/p>\n\n\n\n<p>\u5b58\u5728\u5219\u6253\u5f00\uff0c\u4e0d\u5b58\u5728\u5219\u521b\u5efa<\/p>\n\n\n\n<p>\u65b9\u5f0f\u4e00\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sqlite3 \u3010\u6570\u636e\u5e93\u540d.db\u3011<\/pre>\n\n\n\n<p>\u6bd4\u5982\u8fd9\u91cc\u6211\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u540d\u4e3a test.db\uff08\u53ea\u6709\u771f\u6b63\u5bf9\u6570\u636e\u5e93\u5199\u64cd\u4f5c\u540e\u624d\u4f1a\u521b\u5efa\uff09<\/p>\n\n\n\n<p>\u6267\u884c\u547d\u4ee4\u540e\u4f1a\u8fdb\u5165\u4ea4\u4e92\u73af\u5883<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"729\" height=\"142\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-84.png\" alt=\"\" class=\"wp-image-3582 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-84.png 729w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-84-300x58.png 300w\" data-sizes=\"(max-width: 729px) 100vw, 729px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 729px; --smush-placeholder-aspect-ratio: 729\/142;\" \/><\/figure>\n\n\n\n<p>\u65b9\u5f0f\u4e8c\uff1a<\/p>\n\n\n\n<p>\u5148\u8fdb\u5165\u4ea4\u4e92\u73af\u5883\uff0c\u7136\u540e\u6267\u884c <strong>.oepn \u3010\u6570\u636e\u5e93\u540d\u3011<\/strong>\uff0c\u8be5\u65b9\u5f0f\u4f1a\u76f4\u63a5\u521b\u5efa\u6570\u636e\u5e93\u6587\u4ef6<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"611\" height=\"161\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-85.png\" alt=\"\" class=\"wp-image-3584 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-85.png 611w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-85-300x79.png 300w\" data-sizes=\"(max-width: 611px) 100vw, 611px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 611px; --smush-placeholder-aspect-ratio: 611\/161;\" \/><\/figure>\n\n\n\n<p>\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/p>\n\n\n\n<p>\u6570\u636e\u5e8a\u521b\u5efa\u597d\u540e\uff0c\u6267\u884c .databases \u547d\u4ee4\u53ef\u4ee5\u67e5\u770b<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"640\" height=\"59\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-88.png\" alt=\"\" class=\"wp-image-3588 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-88.png 640w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-88-300x28.png 300w\" data-sizes=\"(max-width: 640px) 100vw, 640px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 640px; --smush-placeholder-aspect-ratio: 640\/59;\" \/><\/figure>\n\n\n\n<p>\uff082\uff09\u5bfc\u51fa\u6570\u636e\u5e93\u5230\u6587\u672c\u6587\u4ef6\u6216\u5bfc\u5165<\/p>\n\n\n\n<p>\u4f7f\u7528 .dump \u547d\u4ee4\u53ef\u4ee5\u5c06\u6570\u636e\u5e93\u5bfc\u51fa\u5230\u6587\u672c\u6587\u4ef6\uff08\u6587\u672c\u6587\u4ef6\u4f1a\u4ee5\u5c06\u6570\u636e\u4ee5 sqlite3 \u8bed\u53e5\u7684\u5f62\u5f0f\u4fdd\u5b58\uff09<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sqlite3 \u3010\u6570\u636e\u5e93\u6587\u4ef6\u540d\u3011 .dump > \u3010\u6587\u672c\u6587\u4ef6.sql\u3011<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"863\" height=\"635\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-89.png\" alt=\"\" class=\"wp-image-3589 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-89.png 863w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-89-300x221.png 300w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-89-768x565.png 768w\" data-sizes=\"(max-width: 863px) 100vw, 863px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 863px; --smush-placeholder-aspect-ratio: 863\/635;\" \/><\/figure>\n\n\n\n<p>\u7531\u6587\u672c\u6587\u4ef6\u5bfc\u5165\u5230\u6570\u636e\u5e93\u6587\u4ef6\u4e2d<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sqlite3 \u3010\u6570\u636e\u5e93\u6587\u4ef6\u540d\u3011 &lt; \u3010\u6587\u672c\u6587\u4ef6\u3011<\/pre>\n\n\n\n<p>\u4e4b\u524d\u6211\u662f\u5728 Linux \u4e0b\u7528\u8fc7 SQLite3\uff0c\u8fd9\u6b21\u6f14\u793a\u662f\u5728 Windows \u4e0b\u4e5f\u662f\u7b2c\u4e00\u6b21\uff0c\u8fd9\u91cc\u5c31\u9047\u5230\u4e86\u51e0\u4e2a\u95ee\u9898\uff1a<\/p>\n\n\n\n<p>\u2460 \u534a\u89d2\u5c0f\u4e8e\u7b26\u53f7\u5c45\u7136\u662f PowerShell \u4fdd\u7559\u7684\uff0c\u65e0\u6cd5\u4f7f\u7528\uff0c\u6211\u4e5f\u662f\u65e0\u8bed\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"559\" height=\"80\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-90.png\" alt=\"\" class=\"wp-image-3590 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-90.png 559w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-90-300x43.png 300w\" data-sizes=\"(max-width: 559px) 100vw, 559px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 559px; --smush-placeholder-aspect-ratio: 559\/80;\" \/><\/figure>\n\n\n\n<p>\u2461 SQLite3 \u672c\u6765\u4e5f\u662f\u5728 msys2 \u4e2d\u5b89\u88c5\u7684\uff0c\u4f46\u662f\u65e0\u6cd5\u8fdb\u5165\u4ea4\u4e92\u73af\u5883\uff0c\u4f1a\u963b\u585e\u65e0\u53cd\u5e94\uff0c\u8fd9\u4e5f\u662f\u6211\u4e3a\u4ec0\u4e48\u7528 PowerShell \u64cd\u4f5c\u7684\u539f\u56e0\uff08\u5c06 msys2 \u7684 bin \u76ee\u5f55\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u5230 Windows \u4e2d\uff09<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"569\" height=\"77\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-92.png\" alt=\"\" class=\"wp-image-3592 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-92.png 569w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-92-300x41.png 300w\" data-sizes=\"(max-width: 569px) 100vw, 569px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 569px; --smush-placeholder-aspect-ratio: 569\/77;\" \/><\/figure>\n\n\n\n<p>\u2462 \u5728 PowerShell \u4e2d\u5bfc\u51fa\u6570\u636e\u5e93\u5230\u6587\u672c\uff0c\u4e0d\u77e5\u9053\u4e3a\u4ec0\u4e48\u6587\u672c\u7684\u5b57\u7b26\u7f16\u7801\u662f UTF-16 LE\uff08\u901a\u8fc7 vscode \u6253\u5f00\u6587\u672c\uff0c\u81ea\u52a8\u8bc6\u522b\u51fa\u7684\u5b57\u7b26\u7f16\u7801\uff09\uff0c\u7136\u540e\u6211\u5728 msys2 \u4e2d\u5c1d\u8bd5\u4ece\u6587\u672c\u5bfc\u5165\u5230\u6570\u636e\u5e93\u6587\u4ef6\u5c31\u4f1a\u5931\u8d25\uff0c\u6211\u731c\u6d4b\u7684\u539f\u56e0\u662f SQLite3 \u9ed8\u8ba4\u7684\u5b57\u7b26\u7f16\u7801\u662f UTF-8\uff0c\u8fd9\u8fb9\u4e0d\u7edf\u4e00\u4f1a\u65e0\u6cd5\u8bc6\u522b\u3002\u7136\u540e\u6211\u76f4\u63a5\u5728 msys2 \u4e2d\u5bfc\u51fa\u6587\u672c\uff0c\u518d\u5bfc\u5165\u5c31\u6ca1\u6709\u95ee\u9898\u4e86\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"547\" height=\"90\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-91.png\" alt=\"\" class=\"wp-image-3591 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-91.png 547w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-91-300x49.png 300w\" data-sizes=\"(max-width: 547px) 100vw, 547px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 547px; --smush-placeholder-aspect-ratio: 547\/90;\" \/><\/figure>\n\n\n\n<p>\u6240\u4ee5\u7ecf\u8fc7\u51e0\u6b21\u5c1d\u8bd5\u540e\uff0c\u603b\u7ed3\u51fa\u4f7f\u7528\u65b9\u5f0f\uff0c\u6d89\u53ca\u6570\u636e\u5e93\u6587\u4ef6\u521b\u5efa\u4ee5\u53ca\u8bfb\u5199\u6570\u636e\u5e93\u5185\u5bb9\u7684\u5728 PowerShell \u64cd\u4f5c\uff0c\u6d89\u53ca\u6570\u636e\u5e93\u6587\u4ef6\u5bfc\u51fa\u5230\u6587\u672c\u4ee5\u53ca\u6587\u672c\u5230\u6570\u636e\u5e93\u7684\u64cd\u4f5c\u5728 msys2 \u4e2d\u8fdb\u884c\u3002<\/p>\n\n\n\n<p>\u989d\uff0c\u7a81\u7136\u53d1\u73b0 cmd \u53cd\u800c\u5b8c\u5168\u6b63\u5e38\u4f7f\u7528\uff08\u53ea\u662f\u4e0d\u77e5\u9053\u548c\u8fd9\u4e2a UTF-8 \u8bbe\u7f6e\u6709\u6ca1\u6709\u5173\u7cfb\uff1a<a href=\"https:\/\/blog.iyatt.com\/?p=3437\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/blog.iyatt.com\/?p=3437<\/a>\uff09\u3002\u73b0\u5728\u7a81\u7136\u53d1\u73b0 cmd \u6bd4 PowerShell \u66f4\u597d\u7528\u4e86\uff0c\u56e0\u4e3a\u628a msys2 \u7684 bin \u76ee\u5f55\u8bbe\u7f6e\u5230 Windows \u7684\u73af\u5883\u53d8\u91cf\u91cc\u4e86\uff0c\u5728 cmd \u4e2d\u4e5f\u80fd\u7528 msys2 \u7684\u547d\u4ee4\uff0c\u90a3\u4e48 PowerShell \u4e5f\u6ca1\u5565\u4f18\u52bf\u4e86\uff0ccmd + msys2 \u540e\u5341\u5206\u597d\u7528\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"631\" height=\"300\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-93.png\" alt=\"\" class=\"wp-image-3594 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-93.png 631w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-93-300x143.png 300w\" data-sizes=\"(max-width: 631px) 100vw, 631px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 631px; --smush-placeholder-aspect-ratio: 631\/300;\" \/><\/figure>\n\n\n\n<p>\u90a3\u4e48\u8fd9\u91cc\u52a0\u4e00\u4e2a\u9898\u5916\u8bdd\uff0c\u5c06 cmd \u6dfb\u52a0\u5230\u53f3\u952e\u4e2d<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-0e86287e-9440-428d-9005-b2fa38b0e98a\" href=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/cmd.reg\">cmd<\/a><a href=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/cmd.reg\" class=\"wp-block-file__button\" download aria-describedby=\"wp-block-file--media-0e86287e-9440-428d-9005-b2fa38b0e98a\">\u4e0b\u8f7d<\/a><\/div>\n\n\n\n<p>\u5c06\u6ce8\u518c\u8868\u6587\u4ef6\u4e0b\u8f7d\u540e\uff0c\u5728\u6587\u4ef6\u7ba1\u7406\u5668\u4e2d\u53cc\u51fb\u6253\u5f00\uff0c\u4e00\u8def\u540c\u610f\u7ee7\u7eed\u5c31\u884c\u3002<\/p>\n\n\n\n<p>\u5728\u6587\u4ef6\u7ba1\u7406\u5668\u4e2d\u67d0\u4e2a\u8def\u5f84\u4e0b\u53f3\u952e\uff0c\u5c31\u80fd\u770b\u5230 cmd\uff0c\u6253\u5f00\u7684 cmd \u8fd0\u884c\u8def\u5f84\u5c31\u5728\u8fd9\u91cc\u4e86<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"294\" height=\"453\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-100.png\" alt=\"\" class=\"wp-image-3609 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-100.png 294w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-100-195x300.png 195w\" data-sizes=\"(max-width: 294px) 100vw, 294px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 294px; --smush-placeholder-aspect-ratio: 294\/453;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"320\" height=\"158\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-101.png\" alt=\"\" class=\"wp-image-3610 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-101.png 320w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-101-300x148.png 300w\" data-sizes=\"(max-width: 320px) 100vw, 320px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 320px; --smush-placeholder-aspect-ratio: 320\/158;\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Win11 \u628a\u53f3\u952e\u83dc\u5355\u5f04\u6210\u6298\u53e0\u4e86\uff0c\u8fd9\u4e2a\u633a\u70e6\u7684\uff0c\u6062\u590d Win10 \u83dc\u5355\uff1a<a href=\"https:\/\/blog.iyatt.com\/?p=3600\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/blog.iyatt.com\/?p=3600<\/a><\/p>\n\n\n\n<p>\uff083\uff09\u521b\u5efa\u8868<\/p>\n\n\n\n<p>\u4f7f\u7528 <strong>CREATE TABLE \u3010\u8868\u540d\u3011\u3010\u8868\u5934\u3011<\/strong>\u5728\u6570\u636e\u5e93\u4e2d\u521b\u5efa\u8868<\/p>\n\n\n\n<p>\u8fd9\u91cc\u6211\u5728\u6570\u636e\u5e93 test.db \u4e2d\u521b\u5efa\u4e24\u5f20\u8868\uff1amy_table1\uff0cmy_table2<\/p>\n\n\n\n<p>\u521b\u5efa\u7b2c\u4e00\u4e2a\u8868 my_table1\uff0c\u8868\u5934\u6709 id\u3001name\u3001age\u3001address \u548c salary\uff0c\u540e\u9762\u6ce8\u660e\u4e86\u8868\u5934\u5bf9\u5e94\u7684\u6570\u636e\u7c7b\u578b\uff0cNOT NULL \u4ee3\u8868\u521b\u5efa\u8bb0\u5f55\u65f6\u4e0d\u80fd\u4e3a NULL \u7684\u9879\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"309\" height=\"119\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-102.png\" alt=\"\" class=\"wp-image-3613 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-102.png 309w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-102-300x116.png 300w\" data-sizes=\"(max-width: 309px) 100vw, 309px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 309px; --smush-placeholder-aspect-ratio: 309\/119;\" \/><\/figure>\n\n\n\n<p>\u7b80\u5355\u7684\u521b\u5efa\u7b2c\u4e8c\u4e2a\u8868 my_table2\uff0c\u8868\u5934\u6709 name \u548c sex<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"358\" height=\"43\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-103.png\" alt=\"\" class=\"wp-image-3614 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-103.png 358w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-103-300x36.png 300w\" data-sizes=\"(max-width: 358px) 100vw, 358px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 358px; --smush-placeholder-aspect-ratio: 358\/43;\" \/><\/figure>\n\n\n\n<p>\u67e5\u770b\u6570\u636e\u5e93\u4e2d\u6240\u6709\u8868\u540d <strong>.table<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"187\" height=\"42\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-104.png\" alt=\"\" class=\"wp-image-3615 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 187px; --smush-placeholder-aspect-ratio: 187\/42;\" \/><\/figure>\n\n\n\n<p>\uff084\uff09\u5220\u9664\u8868<\/p>\n\n\n\n<p><strong>DROP TABLE \u3010\u8868\u540d\u3011<\/strong>\u5220\u9664\u6307\u5b9a\u7684\u8868<\/p>\n\n\n\n<p>\u5220\u9664 my_table2<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"248\" height=\"72\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-105.png\" alt=\"\" class=\"wp-image-3616 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 248px; --smush-placeholder-aspect-ratio: 248\/72;\" \/><\/figure>\n\n\n\n<p>\uff085\uff09\u5411\u8868\u4e2d\u63d2\u5165\u6570\u636e<\/p>\n\n\n\n<p>\u5411 column1\u3001column2\u3001column3 \u5217\u5206\u522b\u63d2\u5165 value1\u3001value2\u3001value3<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">INSERT INTO \u3010\u8868\u540d\u3011(column1, column2, column3) VALUES (value1, value2, value3)<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"698\" height=\"27\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-106.png\" alt=\"\" class=\"wp-image-3619 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-106.png 698w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-106-300x12.png 300w\" data-sizes=\"(max-width: 698px) 100vw, 698px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 698px; --smush-placeholder-aspect-ratio: 698\/27;\" \/><\/figure>\n\n\n\n<p>\u4f9d\u6b21\u63d2\u5165<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">INSERT INTO \u3010\u8868\u540d\u3011 VALUES (value1, value2, value3)<\/pre>\n\n\n\n<p>\u4e0d\u6307\u5b9a\u63d2\u5165\u7684\u5217\u540d\uff0c\u90a3\u4e48\u6709\u591a\u5c11\u5217\uff0c\u5c31\u8981\u63d2\u5165\u591a\u5c11\u5217\u7684\u6570\u636e\uff0c\u5982\u679c\u6ca1\u6709\u5b9e\u9645\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u63d2\u5165 NULL\uff0c\u4f46\u662f\u521b\u5efa\u8868\u65f6\u8bbe\u5b9a\u4e86\u524d\u4e09\u5217\u4e0d\u80fd\u4e3a NULL\uff0c\u6240\u4ee5\u6700\u591a\u53ea\u6709\u540e\u9762\u4e24\u5217\u53ef\u4ee5\u8bbe\u7f6e NULL\uff0c\u5426\u5219\u63d2\u5165\u6570\u636e\u5931\u8d25\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"550\" height=\"24\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-107.png\" alt=\"\" class=\"wp-image-3620 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-107.png 550w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-107-300x13.png 300w\" data-sizes=\"(max-width: 550px) 100vw, 550px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 550px; --smush-placeholder-aspect-ratio: 550\/24;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"591\" height=\"25\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-108.png\" alt=\"\" class=\"wp-image-3621 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-108.png 591w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-108-300x13.png 300w\" data-sizes=\"(max-width: 591px) 100vw, 591px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 591px; --smush-placeholder-aspect-ratio: 591\/25;\" \/><\/figure>\n\n\n\n<p>\uff086\uff09\u67e5\u770b\u6570\u636e<\/p>\n\n\n\n<p>\u67e5\u770b\u6307\u5b9a\u5217\u7684\u6570\u636e<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT column1, column2, column3 FROM \u3010\u8868\u540d\u3011<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"398\" height=\"89\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-109.png\" alt=\"\" class=\"wp-image-3623 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-109.png 398w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-109-300x67.png 300w\" data-sizes=\"(max-width: 398px) 100vw, 398px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 398px; --smush-placeholder-aspect-ratio: 398\/89;\" \/><\/figure>\n\n\n\n<p>\u67e5\u770b\u6240\u6709\u5217\u7684\u6570\u636e<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">SELECT * FROM \u3010\u8868\u540d\u3011<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"289\" height=\"78\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-110.png\" alt=\"\" class=\"wp-image-3624 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 289px; --smush-placeholder-aspect-ratio: 289\/78;\" \/><\/figure>\n\n\n\n<p>\uff087\uff09\u8fd0\u7b97\u7b26<\/p>\n\n\n\n<p>\u2460 \u7b97\u672f\u8fd0\u7b97<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"212\" height=\"186\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-111.png\" alt=\"\" class=\"wp-image-3625 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 212px; --smush-placeholder-aspect-ratio: 212\/186;\" \/><\/figure>\n\n\n\n<p>\u2461 \u6bd4\u8f83\u8fd0\u7b97\u7b26<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>==<\/td><td>\u68c0\u67e5\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u76f8\u7b49\uff0c\u5982\u679c\u76f8\u7b49\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><tr><td>=<\/td><td>\u68c0\u67e5\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u76f8\u7b49\uff0c\u5982\u679c\u76f8\u7b49\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><tr><td>!=<\/td><td>\u68c0\u67e5\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u76f8\u7b49\uff0c\u5982\u679c\u4e0d\u76f8\u7b49\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><tr><td>&lt;&gt;<\/td><td>\u68c0\u67e5\u4e24\u4e2a\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u76f8\u7b49\uff0c\u5982\u679c\u4e0d\u76f8\u7b49\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><tr><td>&gt;<\/td><td>\u68c0\u67e5\u5de6\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u5927\u4e8e\u53f3\u64cd\u4f5c\u6570\u7684\u503c\uff0c\u5982\u679c\u662f\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><tr><td>&lt;<\/td><td>\u68c0\u67e5\u5de6\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u5c0f\u4e8e\u53f3\u64cd\u4f5c\u6570\u7684\u503c\uff0c\u5982\u679c\u662f\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><tr><td>&gt;=<\/td><td>\u68c0\u67e5\u5de6\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u5927\u4e8e\u7b49\u4e8e\u53f3\u64cd\u4f5c\u6570\u7684\u503c\uff0c\u5982\u679c\u662f\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><tr><td>&lt;=<\/td><td>\u68c0\u67e5\u5de6\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u5c0f\u4e8e\u7b49\u4e8e\u53f3\u64cd\u4f5c\u6570\u7684\u503c\uff0c\u5982\u679c\u662f\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><tr><td>!&lt;<\/td><td>\u68c0\u67e5\u5de6\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u4e0d\u5c0f\u4e8e\u53f3\u64cd\u4f5c\u6570\u7684\u503c\uff0c\u5982\u679c\u662f\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><tr><td>!&gt;<\/td><td>\u68c0\u67e5\u5de6\u64cd\u4f5c\u6570\u7684\u503c\u662f\u5426\u4e0d\u5927\u4e8e\u53f3\u64cd\u4f5c\u6570\u7684\u503c\uff0c\u5982\u679c\u662f\u5219\u6761\u4ef6\u4e3a\u771f\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u8fd9\u91cc\u65b0\u5f04\u4e86\u4e00\u4e2a\u8868\u6709 5 \u4e2a\u540d\u5b57\u548c\u5bf9\u5e94\u7684\u5e74\u9f84<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"334\" height=\"108\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-112.png\" alt=\"\" class=\"wp-image-3626 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-112.png 334w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-112-300x97.png 300w\" data-sizes=\"(max-width: 334px) 100vw, 334px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 334px; --smush-placeholder-aspect-ratio: 334\/108;\" \/><figcaption>\u5047\u5982\u6211\u8981\u7b5b\u9009\u5e74\u9f84\u4e0d\u5c0f\u4e8e 20 \u7684<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"439\" height=\"58\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-113.png\" alt=\"\" class=\"wp-image-3627 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-113.png 439w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-113-300x40.png 300w\" data-sizes=\"(max-width: 439px) 100vw, 439px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 439px; --smush-placeholder-aspect-ratio: 439\/58;\" \/><\/figure>\n\n\n\n<p>\u2462 \u903b\u8f91\u8fd0\u7b97\u7b26<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>AND<\/td><td>AND \u8fd0\u7b97\u7b26\u5141\u8bb8\u5728\u4e00\u4e2a SQL \u8bed\u53e5\u7684 WHERE \u5b50\u53e5\u4e2d\u7684\u591a\u4e2a\u6761\u4ef6\u7684\u5b58\u5728\u3002<\/td><\/tr><tr><td>BETWEEN<\/td><td>BETWEEN \u8fd0\u7b97\u7b26\u7528\u4e8e\u5728\u7ed9\u5b9a\u6700\u5c0f\u503c\u548c\u6700\u5927\u503c\u8303\u56f4\u5185\u7684\u4e00\u7cfb\u5217\u503c\u4e2d\u641c\u7d22\u503c\u3002<\/td><\/tr><tr><td>EXISTS<\/td><td>EXISTS \u8fd0\u7b97\u7b26\u7528\u4e8e\u5728\u6ee1\u8db3\u4e00\u5b9a\u6761\u4ef6\u7684\u6307\u5b9a\u8868\u4e2d\u641c\u7d22\u884c\u7684\u5b58\u5728\u3002<\/td><\/tr><tr><td>IN<\/td><td>IN \u8fd0\u7b97\u7b26\u7528\u4e8e\u628a\u67d0\u4e2a\u503c\u4e0e\u4e00\u7cfb\u5217\u6307\u5b9a\u5217\u8868\u7684\u503c\u8fdb\u884c\u6bd4\u8f83\u3002<\/td><\/tr><tr><td>NOT IN<\/td><td>IN \u8fd0\u7b97\u7b26\u7684\u5bf9\u7acb\u9762\uff0c\u7528\u4e8e\u628a\u67d0\u4e2a\u503c\u4e0e\u4e0d\u5728\u4e00\u7cfb\u5217\u6307\u5b9a\u5217\u8868\u7684\u503c\u8fdb\u884c\u6bd4\u8f83\u3002<\/td><\/tr><tr><td>LIKE<\/td><td>LIKE \u8fd0\u7b97\u7b26\u7528\u4e8e\u628a\u67d0\u4e2a\u503c\u4e0e\u4f7f\u7528\u901a\u914d\u7b26\u8fd0\u7b97\u7b26\u7684\u76f8\u4f3c\u503c\u8fdb\u884c\u6bd4\u8f83\u3002<\/td><\/tr><tr><td>GLOB<\/td><td>GLOB \u8fd0\u7b97\u7b26\u7528\u4e8e\u628a\u67d0\u4e2a\u503c\u4e0e\u4f7f\u7528\u901a\u914d\u7b26\u8fd0\u7b97\u7b26\u7684\u76f8\u4f3c\u503c\u8fdb\u884c\u6bd4\u8f83\u3002GLOB \u4e0e LIKE \u4e0d\u540c\u4e4b\u5904\u5728\u4e8e\uff0c\u5b83\u662f\u5927\u5c0f\u5199\u654f\u611f\u7684\u3002<\/td><\/tr><tr><td>NOT<\/td><td>NOT \u8fd0\u7b97\u7b26\u662f\u6240 \u7528\u7684\u903b\u8f91\u8fd0\u7b97\u7b26\u7684\u5bf9\u7acb\u9762\u3002\u6bd4\u5982 NOT EXISTS\u3001NOT BETWEEN\u3001NOT IN\uff0c\u7b49\u7b49\u3002\u5b83\u662f\u5426\u5b9a\u8fd0\u7b97\u7b26\u3002<\/td><\/tr><tr><td>OR<\/td><td>OR \u8fd0\u7b97\u7b26\u7528\u4e8e\u7ed3\u5408\u4e00\u4e2a SQL \u8bed\u53e5\u7684 WHERE \u5b50\u53e5\u4e2d\u7684\u591a\u4e2a\u6761\u4ef6\u3002<\/td><\/tr><tr><td>IS NULL<\/td><td>NULL \u8fd0\u7b97\u7b26\u7528\u4e8e\u628a\u67d0\u4e2a\u503c\u4e0e NULL \u503c\u8fdb\u884c\u6bd4\u8f83\u3002<\/td><\/tr><tr><td>IS<\/td><td>IS \u8fd0\u7b97\u7b26\u4e0e = \u76f8\u4f3c\u3002<\/td><\/tr><tr><td>IS NOT<\/td><td>IS NOT \u8fd0\u7b97\u7b26\u4e0e != \u76f8\u4f3c\u3002<\/td><\/tr><tr><td>||<\/td><td>\u8fde\u63a5\u4e24\u4e2a\u4e0d\u540c\u7684\u5b57\u7b26\u4e32\uff0c\u5f97\u5230\u4e00\u4e2a\u65b0\u7684\u5b57\u7b26\u4e32\u3002<\/td><\/tr><tr><td>UNIQUE<\/td><td>UNIQUE \u8fd0\u7b97\u7b26\u641c\u7d22\u6307\u5b9a\u8868\u4e2d\u7684\u6bcf\u4e00\u884c\uff0c\u786e\u4fdd\u552f\u4e00\u6027\uff08\u65e0\u91cd\u590d\uff09\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u8fd9\u91cc\u6211\u53c8\u91cd\u65b0\u5efa\u4e86\u4e00\u4e2a\u8868\uff0c\u5206\u522b\u4e3a id\u3001name\u3001age<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"301\" height=\"123\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-114.png\" alt=\"\" class=\"wp-image-3628 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 301px; --smush-placeholder-aspect-ratio: 301\/123;\" \/><\/figure>\n\n\n\n<p>\u5047\u5982\u6211\u8981\u7b5b\u9009 age \u5728 \uff0818,25\uff09\u533a\u95f4\u7684<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"516\" height=\"54\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-115.png\" alt=\"\" class=\"wp-image-3629 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-115.png 516w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-115-300x31.png 300w\" data-sizes=\"(max-width: 516px) 100vw, 516px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 516px; --smush-placeholder-aspect-ratio: 516\/54;\" \/><\/figure>\n\n\n\n<p>\u2463 \u4f4d\u8fd0\u7b97\u7b26<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>&amp;<\/td><td>\u4e0e<\/td><\/tr><tr><td>|<\/td><td>\u6216<\/td><\/tr><tr><td>~<\/td><td>\u53d6<\/td><\/tr><tr><td>&lt;&lt;<\/td><td>\u5de6\u79fb<\/td><\/tr><tr><td>&gt;&gt;<\/td><td>\u53f3\u79fb<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\uff088\uff09\u66f4\u65b0\u6570\u636e<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">UPDATE \u3010\u8868\u540d\u3011 SET \u3010\u5217\u540d\u3011=\u3010\u65b0\u503c\u3011 WHERE \u3010\u6761\u4ef6\u3011<\/pre>\n\n\n\n<p>\u5c06 name \u4e3a D \u7684 age \u6539\u4e3a10<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"507\" height=\"140\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-116.png\" alt=\"\" class=\"wp-image-3631 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-116.png 507w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-116-300x83.png 300w\" data-sizes=\"(max-width: 507px) 100vw, 507px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 507px; --smush-placeholder-aspect-ratio: 507\/140;\" \/><\/figure>\n\n\n\n<p>\u6ce8\u610f\u4e0d\u8bbe\u7f6e\u6761\u4ef6\u4f1a\u66f4\u6539\u6240\u6709\u884c\uff0c\u5982<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"376\" height=\"141\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-117.png\" alt=\"\" class=\"wp-image-3632 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-117.png 376w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-117-300x113.png 300w\" data-sizes=\"(max-width: 376px) 100vw, 376px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 376px; --smush-placeholder-aspect-ratio: 376\/141;\" \/><\/figure>\n\n\n\n<p>\uff089\uff09\u5220\u9664\u8868\u4e2d\u7684\u6570\u636e<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">DELETE FROM \u3010\u8868\u540d\u3011 WHERE \u3010\u6761\u4ef6\u3011<\/pre>\n\n\n\n<p>\u8fd9\u91cc\u5220\u9664 id \u4e3a 3 \u7684\u8bb0\u5f55<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"417\" height=\"116\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-118.png\" alt=\"\" class=\"wp-image-3633 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-118.png 417w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-118-300x83.png 300w\" data-sizes=\"(max-width: 417px) 100vw, 417px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 417px; --smush-placeholder-aspect-ratio: 417\/116;\" \/><\/figure>\n\n\n\n<p>\u4e0d\u52a0\u6761\u4ef6\u65f6\uff0c\u5220\u9664\u8868\u79cd\u6240\u6709\u8bb0\u5f55<\/p>\n\n\n\n<p>\uff0810\uff09\u6587\u672c\u5339\u914d<\/p>\n\n\n\n<p>\u2460 LIKE \uff08\u5927\u5c0f\u5199\u4e0d\u654f\u611f\uff09<\/p>\n\n\n\n<p>\u6709\u4e24\u4e2a\u901a\u914d\u7b26\u914d\u5408\u4e00\u8d77\u4f7f\u7528<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>%<\/td><td>\u4ee3\u8868\u96f6\u4e2a\u3001\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6216\u5b57\u7b26<\/td><\/tr><tr><td>_<\/td><td>\u4ee3\u8868\u4e00\u4e2a\u6570\u5b57\u6216\u5b57\u7b26<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u8fd9\u91cc\u6709\u4e00\u5f20\u8868<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"289\" height=\"69\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-128.png\" alt=\"\" class=\"wp-image-3649 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 289px; --smush-placeholder-aspect-ratio: 289\/69;\" \/><\/figure>\n\n\n\n<p>\u5047\u5982\u6211\u8981\u7b5b\u9009 name \u5217\u4ee5 \u201cXiao\u201d \u5f00\u5934\u7684<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"485\" height=\"70\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-129.png\" alt=\"\" class=\"wp-image-3650 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-129.png 485w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-129-300x43.png 300w\" data-sizes=\"(max-width: 485px) 100vw, 485px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 485px; --smush-placeholder-aspect-ratio: 485\/70;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"501\" height=\"57\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-131.png\" alt=\"\" class=\"wp-image-3652 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-131.png 501w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-131-300x34.png 300w\" data-sizes=\"(max-width: 501px) 100vw, 501px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 501px; --smush-placeholder-aspect-ratio: 501\/57;\" \/><\/figure>\n\n\n\n<p>\u5047\u5982\u6211\u8981\u7b5b\u9009 age \u4ee5 1 \u5f00\u5934\u7684<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"442\" height=\"73\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-130.png\" alt=\"\" class=\"wp-image-3651 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-130.png 442w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-130-300x50.png 300w\" data-sizes=\"(max-width: 442px) 100vw, 442px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 442px; --smush-placeholder-aspect-ratio: 442\/73;\" \/><\/figure>\n\n\n\n<p>\u2461 GLOB \uff08\u5927\u5c0f\u5199\u654f\u611f\uff09<\/p>\n\n\n\n<p>\u6709\u4e24\u4e2a\u901a\u914d\u7b26\u914d\u5408\u4f7f\u7528<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>*<\/td><td>\u4ee3\u8868\u96f6\u4e2a\u3001\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u5b57\u6216\u5b57\u7b26<\/td><\/tr><tr><td>?<\/td><td>\u4ee3\u8868\u4e00\u4e2a\u6570\u5b57\u6216\u5b57\u7b26<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u7528\u6cd5\u548c LIKE \u7c7b\u4f3c\uff0c\u53ea\u662f\u5927\u5c0f\u5199\u654f\u611f<\/p>\n\n\n\n<p>\uff0811\uff09\u9650\u5236 SELECT \u8fd4\u56de\u8bb0\u5f55\u6570\u91cf<\/p>\n\n\n\n<p>\u53ea\u8fd4\u56de n \u6761\u8bb0\u5f55<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">xxxx LIMIT n<\/pre>\n\n\n\n<p>OFFSET \u6307\u5b9a\u504f\u79fb\u91cf\uff0c\u4ece\u4e0b\u6807 m \u5f00\u59cb\u7684 n \u6761\u8bb0\u5f55<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">xxxx LIMIT n OFFSET m<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"408\" height=\"185\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-132.png\" alt=\"\" class=\"wp-image-3654 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-132.png 408w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-132-300x136.png 300w\" data-sizes=\"(max-width: 408px) 100vw, 408px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 408px; --smush-placeholder-aspect-ratio: 408\/185;\" \/><\/figure>\n\n\n\n<p>\uff0812\uff09\u8fd4\u56de\u6392\u5e8f\u540e\u7684\u8bb0\u5f55<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># \u5347\u5e8f\/\u964d\u5e8f\uff08\u4e0d\u6307\u5b9a\u9ed8\u8ba4\u5347\u5e8f\uff09\nXXXX ORDER BY \u3010\u5217\u540d\u3011 ASC\/DESC<\/pre>\n\n\n\n<p>\u6309 age \u5347\u5e8f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"439\" height=\"89\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-133.png\" alt=\"\" class=\"wp-image-3656 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-133.png 439w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-133-300x61.png 300w\" data-sizes=\"(max-width: 439px) 100vw, 439px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 439px; --smush-placeholder-aspect-ratio: 439\/89;\" \/><\/figure>\n\n\n\n<p>\u6309 id \u964d\u5e8f<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"467\" height=\"73\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-134.png\" alt=\"\" class=\"wp-image-3657 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-134.png 467w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-134-300x47.png 300w\" data-sizes=\"(max-width: 467px) 100vw, 467px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 467px; --smush-placeholder-aspect-ratio: 467\/73;\" \/><\/figure>\n\n\n\n<p>\uff0813\uff09\u6570\u636e\u5206\u7ec4<\/p>\n\n\n\n<p>GROUP BY \u7528\u4e8e\u5bf9\u76f8\u540c\u6570\u636e\u8fdb\u884c\u5206\u7ec4\uff0c\u8be5\u5b50\u53e5\u5e94\u4f4d\u4e8e WHERE \u540e\uff0cORDER BY \u4e4b\u524d\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u521b\u5efa\u4e86\u4e00\u5f20\u8868\uff0c\u7b2c\u4e00\u5217\u4e3a name\uff0c\u7b2c\u4e8c\u5217\u4e3a nums<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"286\" height=\"134\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-135.png\" alt=\"\" class=\"wp-image-3658 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 286px; --smush-placeholder-aspect-ratio: 286\/134;\" \/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\u7b2c\u4e00\u5217\u6709\u91cd\u590d\u7684 name\uff0c\u5047\u5982\u6211\u7528\u7edf\u8ba1\u6bcf\u4e2a name \u5bf9\u5e94\u7684\u6570\u5b57\u4e4b\u548c<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"509\" height=\"92\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-136.png\" alt=\"\" class=\"wp-image-3659 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-136.png 509w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-136-300x54.png 300w\" data-sizes=\"(max-width: 509px) 100vw, 509px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 509px; --smush-placeholder-aspect-ratio: 509\/92;\" \/><\/figure>\n\n\n\n<p>\u5982\u679c\u4e0d\u8ba1\u7b97\u548c\uff0c\u90a3\u4e48\u5c31\u662f\u8fd4\u56de\u6bcf\u4e2a name \u7684\u7b2c\u4e00\u6761\u8bb0\u5f55<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"498\" height=\"179\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-137.png\" alt=\"\" class=\"wp-image-3660 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-137.png 498w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-137-300x108.png 300w\" data-sizes=\"(max-width: 498px) 100vw, 498px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 498px; --smush-placeholder-aspect-ratio: 498\/179;\" \/><\/figure>\n\n\n\n<p>HAVING \u7528\u4e8e\u5728 GROYUP BY \u7684\u57fa\u7840\u4e0a\u8fc7\u6ee4\u7ed3\u679c<\/p>\n\n\n\n<p>\u5047\u5982\u8fd9\u91cc\u6211\u8981\u83b7\u53d6 name \u81f3\u5c11\u51fa\u73b0\u4e24\u6b21\u7684 nums \u603b\u548c<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"698\" height=\"64\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-138.png\" alt=\"\" class=\"wp-image-3661 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-138.png 698w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-138-300x28.png 300w\" data-sizes=\"(max-width: 698px) 100vw, 698px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 698px; --smush-placeholder-aspect-ratio: 698\/64;\" \/><\/figure>\n\n\n\n<p>(14\uff09\u53bb\u91cd<\/p>\n\n\n\n<p>DISTINCT \u914d\u5408 select \u4e00\u8d77\u4f7f\u7528\uff0c\u6d88\u9664\u91cd\u590d\u8bb0\u5f55\uff0c\u6bd4\u5982\u4e0b\u9762\u7b5b\u9009 name\uff0c\u91cd\u590d\u7684\u4e0d\u518d\u663e\u793a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"417\" height=\"98\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-139.png\" alt=\"\" class=\"wp-image-3662 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-139.png 417w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-139-300x71.png 300w\" data-sizes=\"(max-width: 417px) 100vw, 417px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 417px; --smush-placeholder-aspect-ratio: 417\/98;\" \/><\/figure>\n\n\n\n<p>\uff0815\uff09\u9644\u52a0\u6570\u636e\u5e93\u548c\u5206\u79bb\u6570\u636e\u5e93<\/p>\n\n\n\n<p>\u53ef\u4ee5\u5c06\u5176\u5b83\u6570\u636e\u5e93\u5173\u8054\u5230\u81ea\u5df1\u4e0a\u9762\uff0c\u7136\u540e\u5b9e\u73b0\u540c\u65f6\u8bbf\u95ee\u81ea\u5df1\u548c\u522b\u7684\u6570\u636e\u5e93\u3002<\/p>\n\n\n\n<p>\u6bd4\u5982\u8fd9\u91cc\u6211\u521b\u5efa\u4e86\u4e24\u4e2a\u6570\u636e\u5e93\uff0c<\/p>\n\n\n\n<p>\u7b2c\u4e00\u4e2a\u4e3a database1.db\uff0c\u542b\u6709\u4e00\u5f20\u8868\u53eb table1<\/p>\n\n\n\n<p>\u7b2c\u4e8c\u4e2a\u4e3a database2.db\uff0c\u542b\u6709\u4e00\u5f20\u8868\u53eb table2<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"521\" height=\"114\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-140.png\" alt=\"\" class=\"wp-image-3664 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-140.png 521w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-140-300x66.png 300w\" data-sizes=\"(max-width: 521px) 100vw, 521px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 521px; --smush-placeholder-aspect-ratio: 521\/114;\" \/><\/figure>\n\n\n\n<p>\u7136\u540e\u8fd9\u91cc\u6211\u5148\u6253\u5f00 database1.db\uff0c\u7136\u540e\u5c06 database2.db \u9644\u52a0\u5230 database1.db \u91cc\uff0c\u5e76\u547d\u540d\u4e3a database2<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ATTACH DATABASE 'database2.db' AS database2<\/pre>\n\n\n\n<p>\u67e5\u770b\u5f53\u524d\u9644\u52a0\u7684\u6570\u636e<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">.database<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"603\" height=\"75\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-144.png\" alt=\"\" class=\"wp-image-3668 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-144.png 603w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-144-300x37.png 300w\" data-sizes=\"(max-width: 603px) 100vw, 603px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 603px; --smush-placeholder-aspect-ratio: 603\/75;\" \/><\/figure>\n\n\n\n<p>\u7136\u540e\u53ef\u4ee5\u67e5\u770b\u6570\u636e\u5e93\u4e2d\u6709\u54ea\u4e9b\u8868\uff0c\u53ef\u4ee5\u770b\u5230 database2.db \u6570\u636e\u5e93\u4e2d\u7684\u8868\uff0c\u4e5f\u80fd\u8bbf\u95ee<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"232\" height=\"36\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-142.png\" alt=\"\" class=\"wp-image-3666 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 232px; --smush-placeholder-aspect-ratio: 232\/36;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"369\" height=\"78\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-143.png\" alt=\"\" class=\"wp-image-3667 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-143.png 369w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-143-300x63.png 300w\" data-sizes=\"(max-width: 369px) 100vw, 369px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 369px; --smush-placeholder-aspect-ratio: 369\/78;\" \/><\/figure>\n\n\n\n<p>\u6ce8\u610f\uff0c\u53ea\u8981\u9000\u51fa\u4ea4\u4e92\u73af\u5883\uff0c\u90a3\u4e48\u9644\u52a0\u5173\u7cfb\u5c31\u89e3\u9664\u4e86\u3002\u6216\u8005\u8bbe\u7f6e\u4e86\u9644\u52a0\uff0c\u8981\u5206\u79bb\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u6267\u884c<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">DETACH DATABASE \u3010\u9644\u52a0\u6570\u636e\u5e93\u7684\u547d\u540d\u3011<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"553\" height=\"74\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-145.png\" alt=\"\" class=\"wp-image-3669 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-145.png 553w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-145-300x40.png 300w\" data-sizes=\"(max-width: 553px) 100vw, 553px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 553px; --smush-placeholder-aspect-ratio: 553\/74;\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"C_%E8%AF%AD%E8%A8%80%E5%BC%80%E5%8F%91\"><\/span>C \u8bed\u8a00\u5f00\u53d1<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>CMakeLists.txt<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cmake_minimum_required(VERSION 3.16.0)\nproject(sqlite3_test VERSION 0.1 LANGUAGES C)\n\nset(CMAKE_C_STANDARD 17)\nset(CMAKE_C_FLAGS_RELEASE \"-no-pie -O3\")\nset(CMAKE_C_FLAGS_DEBUG \"-no-pie -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Werror=format-security -Wextra -pedantic -Wimplicit-fallthrough -Wsequence-point -Wswitch-unreachable -Wswitch-enum -Wstringop-truncation -Wbool-compare -Wtautological-compare -Wfloat-equal -Wshadow=global -Wpointer-arith -Wpointer-compare -Wcast-align -Wcast-qual -Wwrite-strings -Wdangling-else -Wlogical-op -Wconversion -g -O0 -DDEBUG\")\nset(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}\/bin)\n\naux_source_directory(${CMAKE_SOURCE_DIR} SRC)\nadd_executable(sqlite3_test ${SRC})\n\nfind_package(SQLite3 3.30.0 REQUIRED)\ntarget_link_libraries(sqlite3_test ${SQLite3_LIBRARIES})<\/pre>\n\n\n\n<p>\uff081\uff09\u8fde\u63a5\u6570\u636e\u5e93<\/p>\n\n\n\n<p>\u4e0d\u5b58\u5728\u5c31\u521b\u5efa<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#include \"sqlite3.h\"\n\n#include &lt;stdio.h>\n\n\nint main()\n{\n    sqlite3 *db;  \/\/ \u53e5\u67c4\n    if (sqlite3_open(\"test.db\", &amp;db) != SQLITE_OK)  \/\/ \u6253\u5f00\u6570\u636e\u5e93\n    {\n        fprintf(stderr, \"\u6253\u5f00\u6570\u636e\u5e93\u5931\u8d25\uff1a%s\\n\", sqlite3_errmsg(db));  \/\/ \u9519\u8bef\u4fe1\u606f\n        return 1;\n    }\n    else\n    {\n        printf(\"\u8fde\u63a5\u6570\u636e\u5e93\u6210\u529f\uff01\\n\");\n    }\n    sqlite3_close(db);  \/\/ \u5173\u95ed\u6570\u636e\u5e93\n}<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"939\" height=\"755\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-147.png\" alt=\"\" class=\"wp-image-3673 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-147.png 939w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-147-300x241.png 300w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-147-768x618.png 768w\" data-sizes=\"(max-width: 939px) 100vw, 939px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 939px; --smush-placeholder-aspect-ratio: 939\/755;\" \/><\/figure>\n\n\n\n<p>\uff082\uff09\u521b\u5efa\u8868<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#include \"sqlite3.h\"\n\n#include &lt;stdio.h>\n\n\nint main()\n{\n    sqlite3 *db;  \/\/ \u53e5\u67c4\n    if (sqlite3_open(\"test.db\", &amp;db) != SQLITE_OK)  \/\/ \u6253\u5f00\u6570\u636e\u5e93\n    {\n        fprintf(stderr, \"\u6253\u5f00\u6570\u636e\u5e93\u5931\u8d25\uff1a%s\\n\", sqlite3_errmsg(db));\n        return 1;\n    }\n\n    const char *create_table = \"CREATE TABLE my_table(\" \\\n                        \"name TEXT NOT NULL,\" \\\n                        \"age INT NOT NULL);\";  \/\/ sql \u8bed\u53e5\n    \n    char *err_msg = NULL;  \/\/ \u7528\u4e8e\u5b58\u653e\u9519\u8bef\u4fe1\u606f\n    if (sqlite3_exec(db, create_table, NULL, NULL, &amp;err_msg) != SQLITE_OK)  \/\/ \u6267\u884c SQL \u8bed\u53e5\n    {\n        fprintf(stderr, \"SQL \u8bed\u53e5\u6267\u884c\u9519\u8bef: %s\\n\", err_msg);\n        sqlite3_free(err_msg);\n    }\n\n    sqlite3_close(db);\n}<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"544\" height=\"153\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-148.png\" alt=\"\" class=\"wp-image-3674 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-148.png 544w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-148-300x84.png 300w\" data-sizes=\"(max-width: 544px) 100vw, 544px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 544px; --smush-placeholder-aspect-ratio: 544\/153;\" \/><\/figure>\n\n\n\n<p>\uff083\uff09\u63d2\u5165\u6570\u636e<\/p>\n\n\n\n<p>\u57fa\u672c\u4e0a\u5404\u79cd\u64cd\u4f5c\u90fd\u662f\u57fa\u4e8e SQL \u8bed\u53e5\u7684\uff0c\u5c31\u662f\u4f7f\u7528 sqlite3_exec() \u6267\u884c\u8bed\u53e5\uff0c\u5305\u62ec\u67e5\u8be2 SELECT\u3001\u66f4\u65b0\u8bb0\u5f55 UPDATE\uff0c\u5220\u9664\u8bb0\u5f55 DELETE \u7b49\u7b49\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#include \"sqlite3.h\"\n\n#include &lt;stdio.h>\n\n\nint main()\n{\n    sqlite3 *db;  \/\/ \u53e5\u67c4\n    if (sqlite3_open(\"test.db\", &amp;db) != SQLITE_OK)  \/\/ \u6253\u5f00\u6570\u636e\u5e93\n    {\n        fprintf(stderr, \"\u6253\u5f00\u6570\u636e\u5e93\u5931\u8d25\uff1a%s\\n\", sqlite3_errmsg(db));\n        return 1;\n    }\n\n    const char *insert_values = \"INSERT INTO my_table VALUES ('Xiao Hong', 20);\" \\\n                                    \"INSERT INTO my_table VALUES ('Xiao Zhang', 18);\" \\\n                                    \"INSERT INTO my_table VALUES ('Zhang Fei', 34);\";  \/\/ sql \u8bed\u53e5\n    \n    char *err_msg = NULL;  \/\/ \u7528\u4e8e\u5b58\u653e\u9519\u8bef\u4fe1\u606f\n    if (sqlite3_exec(db, insert_values, NULL, NULL, &amp;err_msg) != SQLITE_OK)  \/\/ \u6267\u884c SQL \u8bed\u53e5\n    {\n        fprintf(stderr, \"SQL \u8bed\u53e5\u6267\u884c\u9519\u8bef: %s\\n\", err_msg);\n        sqlite3_free(err_msg);\n    }\n\n    sqlite3_close(db);\n}<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"302\" height=\"100\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-149.png\" alt=\"\" class=\"wp-image-3675 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-149.png 302w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-149-300x99.png 300w\" data-sizes=\"(max-width: 302px) 100vw, 302px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 302px; --smush-placeholder-aspect-ratio: 302\/100;\" \/><\/figure>\n\n\n\n<p>\uff084\uff09SELECT \u83b7\u53d6\u8bb0\u5f55<\/p>\n\n\n\n<p>\u65b9\u6cd5\u4e00\uff1asqlite3_exec()<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#include \"sqlite3.h\"\n\n#include &lt;stdio.h>\n\n\n\/**\n * @brief sqlite3_exec() \u7684\u56de\u8c03\u51fd\u6570\n * @param data sqlite3_exec() \u7684\u7b2c 4 \u4e2a\u53c2\u6570\u4f1a\u4f20\u9012\u5230\u8fd9\u91cc\n * @param argc SELECT \u83b7\u53d6\u7684\u8bb0\u5f55\u7684\u603b\u5217\u6570\n * @param argv SELECT \u83b7\u53d6\u7684\u8bb0\u5f55\u6709\u591a\u5c11\u884c\uff0ccallback() \u5c31\u4f1a\u88ab\u8c03\u7528\u591a\u5c11\u6b21\uff0c\n *              \u6bcf\u4e00\u6b21\u8c03\u7528\u4f20\u5165\u4e00\u884c\u8bb0\u5f55\u5230 argv\uff0cargv[0] \u5c31\u662f\u8be5\u884c\u7684\u7b2c\u4e00\u5217\u6570\u636e\uff0c\n *              argv[1] \u5c31\u662f\u6539\u884c\u7684\u7b2c\u4e8c\u5217\u6570\u636e......\n * @param col_name \u5217\u540d\uff0ccol_name[0] \u4e3a\u7b2c\u4e00\u5217\u7684\u540d\u5b57, col_name[1] \u4e3a\u7b2c\u4e8c\u5217\u7684\u540d\u5b57......\n *\/\nint callback(void *data, int argc, char **argv, char **col_name)\n{\n    (void)data;  \/\/ \u672a\u4f20\u5165\u53c2\u6570\uff0c\u8fd9\u91cc\u4e0d\u4f7f\u7528\n    for (int i = 0; i &lt; argc; ++i)\n    {\n        printf(\"%s=%s\\n\", col_name[i], argv[i]);\n    }\n    return 0;\n}\n\n\nint main()\n{\n    sqlite3 *db;  \/\/ \u53e5\u67c4\n    if (sqlite3_open(\"test.db\", &amp;db) != SQLITE_OK)  \/\/ \u6253\u5f00\u6570\u636e\u5e93\n    {\n        fprintf(stderr, \"\u6253\u5f00\u6570\u636e\u5e93\u5931\u8d25\uff1a%s\\n\", sqlite3_errmsg(db));\n        return 1;\n    }\n\n    char *err_msg = NULL;  \/\/ \u7528\u4e8e\u5b58\u653e\u9519\u8bef\u4fe1\u606f\n    if (sqlite3_exec(db, \"SELECT * FROM my_table\", callback, NULL, &amp;err_msg) != SQLITE_OK)  \/\/ \u6267\u884c SQL \u8bed\u53e5\n    {\n        fprintf(stderr, \"SQL \u8bed\u53e5\u6267\u884c\u9519\u8bef: %s\\n\", err_msg);\n        sqlite3_free(err_msg);\n    }\n\n    sqlite3_close(db);\n}<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"375\" height=\"240\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-150.png\" alt=\"\" class=\"wp-image-3676 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-150.png 375w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-150-300x192.png 300w\" data-sizes=\"(max-width: 375px) 100vw, 375px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 375px; --smush-placeholder-aspect-ratio: 375\/240;\" \/><\/figure>\n\n\n\n<p>\u65b9\u6cd5\u4e8c\uff1asqlite3_get_table()<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#include \"sqlite3.h\"\n\n#include &lt;stdio.h>\n\n\nint main()\n{\n    sqlite3 *db;  \/\/ \u53e5\u67c4\n    if (sqlite3_open(\"test.db\", &amp;db) != SQLITE_OK)  \/\/ \u6253\u5f00\u6570\u636e\u5e93\n    {\n        fprintf(stderr, \"\u6253\u5f00\u6570\u636e\u5e93\u5931\u8d25\uff1a%s\\n\", sqlite3_errmsg(db));\n        return 1;\n    }\n\n    char *err_msg = NULL;  \/\/ \u7528\u4e8e\u5b58\u653e\u9519\u8bef\u4fe1\u606f\n    char **result = NULL;  \/\/ \u7528\u4e8e\u5b58\u653e\u67e5\u8be2\u7ed3\u679c\n    int row, col;  \/\/ \u7528\u4e8e\u5b58\u8bbf\u67e5\u8be2\u7ed3\u679c\u7684\u884c\u5217\u6570\n    if (sqlite3_get_table(db, \"SELECT * FROM my_table\", &amp;result, &amp;row, &amp;col, &amp;err_msg) != SQLITE_OK)  \/\/ \u67e5\u8be2\u8bb0\u5f55\n    {\n        fprintf(stderr, \"SQL \u8bed\u53e5\u6267\u884c\u9519\u8bef: %s\\n\", err_msg);\n        sqlite3_free(err_msg);\n    }\n    else\n    {\n        \/\/ \u67e5\u8be2\u7684\u7ed3\u679c\u4f1a\u4ee5\u4e00\u7ef4\u6570\u7ec4\u7684\u5f62\u5f0f\u5b58\u8bbf\u5230 result \u4e2d\n        \/\/ \u67e5\u8be2\u8bb0\u5f55\u6709 col \u5217\uff0c\u5219 result \u7684 [0\uff0ccol\uff09\u533a\u95f4\u4e0b\u6807\u7684\u5143\u7d20\u4e3a\u5217\u540d\uff0c\u5373\u7b2c\u4e00\u884c\uff08\u4e0b\u6807 0\uff09\n        \/\/ \u884c\u5faa\u73af\u4ece\u4e0b\u6807 1 \u5f00\u59cb\uff0c\u5373\u6570\u636e\u7684\u5f00\u59cb\u4f4d\u7f6e\u662f i *col + j = 1 * col + 0 = col\n        \/\/ row \u672c\u8eab\u662f\u6307\u67e5\u8be2\u6570\u636e\u7684\u884c\u6570\uff0c\u6ca1\u6709\u8ba1\u7b97\u5217\u540d\u90a3\u884c\uff0c\u6240\u4ee5\u884c\u5faa\u73af\u4e0b\u6807\u622a\u6b62\u4f4d\u7f6e\u662f row\uff0c\u800c\u4e0d\u662f row - 1\n        for (int i = 1; i &lt;= row; ++i)\n        {\n            for (int j = 0; j &lt; col; ++j)\n            {\n                printf(\"%s=%s\\n\", result[j], result[i * col + j]);\n            }\n        }\n    }\n\n    sqlite3_free_table(result);\n    sqlite3_close(db);\n}<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"177\" height=\"176\" data-src=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-151.png\" alt=\"\" class=\"wp-image-3678 lazyload\" data-srcset=\"https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-151.png 177w, https:\/\/blog.iyatt.com\/wp-content\/uploads\/2022\/03\/image-151-150x150.png 150w\" data-sizes=\"(max-width: 177px) 100vw, 177px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 177px; --smush-placeholder-aspect-ratio: 177\/176;\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53d1\u5e03\u4e8e\uff1ablog.iyatt.com \u7b80\u4ecb SQLite \u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u7684\u5f00\u6e90\u5d4c\u5165\u5f0f\u6570\u636e\u5e93\uff0c\u4f7f\u7528\u65b9\u4fbf\uff0c\u6027\u80fd\u51fa\u4f17\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"zakra_page_container_layout":"customizer","zakra_page_sidebar_layout":"customizer","zakra_remove_content_margin":false,"zakra_sidebar":"customizer","zakra_transparent_header":"customizer","zakra_logo":0,"zakra_main_header_style":"default","zakra_menu_item_color":"","zakra_menu_item_hover_color":"","zakra_menu_item_active_color":"","zakra_menu_active_style":"","zakra_page_header":true,"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-3581","post","type-post","status-publish","format-standard","hentry","category-all"],"modified_by":"IYATT-yx","_links":{"self":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/3581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3581"}],"version-history":[{"count":0,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=\/wp\/v2\/posts\/3581\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iyatt.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}