{"id":7361,"date":"2024-11-14T08:34:19","date_gmt":"2024-11-14T00:34:19","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7361\/"},"modified":"2024-11-14T08:34:19","modified_gmt":"2024-11-14T00:34:19","slug":"mysql-%e8%87%aa%e5%8a%a8%e5%a2%9e%e9%87%8f%e7%aa%81%e7%84%b6%e5%8f%98%e4%b8%ba-10000%ef%bc%8c%e6%98%af%e4%bb%80%e4%b9%88%e5%8e%9f%e5%9b%a0%e5%af%bc%e8%87%b4%e7%9a%84%ef%bc%8c%e5%a6%82%e4%bd%95","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7361\/","title":{"rendered":"MySQL \u81ea\u52a8\u589e\u91cf\u7a81\u7136\u53d8\u4e3a 10000\uff0c\u662f\u4ec0\u4e48\u539f\u56e0\u5bfc\u81f4\u7684\uff0c\u5982\u4f55\u89e3\u51b3\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173072971597287.jpg\" class=\"aligncenter\" title=\"MySQL \u81ea\u52a8\u589e\u91cf\u7a81\u7136\u53d8\u4e3a 10000\uff0c\u662f\u4ec0\u4e48\u539f\u56e0\u5bfc\u81f4\u7684\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" alt=\"MySQL \u81ea\u52a8\u589e\u91cf\u7a81\u7136\u53d8\u4e3a 10000\uff0c\u662f\u4ec0\u4e48\u539f\u56e0\u5bfc\u81f4\u7684\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong> \u81ea\u52a8\u589e\u91cf\u4ece 0 \u53d8\u4e3a 10000 \u7684\u539f\u56e0\u53ca\u89e3\u51b3\u65b9\u6cd5<\/strong><\/p>\n<p>mysql \u8868\u7684\u4e3b\u952e\u901a\u5e38\u4ece 0 \u5f00\u59cb\u9012\u589e\uff0c\u4f46\u6709\u65f6\u5019\u5b83\u53ef\u80fd\u4f1a\u7a81\u7136\u53d8\u4e3a 10000 \u7b49\u8f83\u5927\u7684\u503c\u3002\u8fd9\u79cd\u73b0\u8c61\u901a\u5e38\u4e0e\u4ee5\u4e0b\u64cd\u4f5c\u6709\u5173\uff1a<\/p>\n<p><strong>\u5bfc\u5165\/\u5bfc\u51fa\u6570\u636e<\/strong><\/p>\n<p>\u5982\u679c\u4ece\u53e6\u4e00\u4e2a\u6570\u636e\u5e93\u5bfc\u5165\u7684\u6570\u636e\u4e2d\u5305\u542b\u6bd4\u5f53\u524d\u4e3b\u952e\u503c\u66f4\u9ad8\u7684 id\uff0c\u5219 mysql \u4f1a\u81ea\u52a8\u5c06\u4e3b\u952e\u9012\u589e\u5230\u5bfc\u5165\u7684\u6570\u636e\u4e2d\u7684\u6700\u9ad8 id \u503c\u3002\u7c7b\u4f3c\u5730\uff0c\u5982\u679c\u4ece\u5f53\u524d\u8868\u4e2d\u5bfc\u51fa\u5e76\u91cd\u65b0\u5bfc\u5165\u6570\u636e\uff0c\u4e3b\u952e\u4e5f\u4f1a\u88ab\u91cd\u7f6e\u4e3a\u5bfc\u51fa\u7684\u6700\u9ad8 id \u503c\u3002<\/p>\n<p><strong>\u5220\u9664\u6570\u636e<\/strong><\/p>\n<p>\u5f53\u4ece\u8868\u4e2d\u5220\u9664\u5927\u91cf\u6570\u636e\u65f6\uff0cmysql \u53ef\u80fd\u4f1a\u4fdd\u7559\u8fd9\u4e9b\u6570\u636e\u5360\u7528\u7684\u95f4\u9699\uff08gap\uff09\uff0c\u4ee5\u4fbf\u540e\u7eed\u63d2\u5165\u7684\u65b0\u6570\u636e\u91cd\u65b0\u4f7f\u7528\u8fd9\u4e9b\u95f4\u9699\u3002\u8fd9\u4f1a\u5bfc\u81f4\u65b0\u63d2\u5165\u7684\u6570\u636e\u4f7f\u7528\u6bd4\u5220\u9664\u6570\u636e\u66f4\u9ad8\u7684\u4e3b\u952e\u503c\u3002<\/p>\n<p><strong>\u4fee\u590d\u65b9\u6cd5<\/strong><\/p>\n<p>\u8981\u4fee\u6539\u81ea\u52a8\u589e\u91cf\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u6267\u884c\u4ee5\u4e0b\u8bed\u53e5\uff1a<\/p>\n<pre>ALTER TABLE table_name AUTO_INCREMENT = new_value;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d\uff0ctable_name \u662f\u8868\u540d\uff0cnew_value \u662f\u8981\u8bbe\u7f6e\u7684\u65b0\u81ea\u52a8\u589e\u91cf\u503c\u3002<\/p>\n<p>\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u63a7\u5236\u4e3b\u952e\u9012\u589e\u5230\u51e0\u7684\u662f\u8868\u7684 auto_increment \u5c5e\u6027\uff0c\u53ef\u4ee5\u4ece\u8868\u7ed3\u6784\u4e2d\u67e5\u770b\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fMySQL \u81ea\u52a8\u589e\u91cf\u7a81\u7136\u53d8\u4e3a 10000\uff0c\u662f\u4ec0\u4e48\u539f\u56e0\u5bfc\u81f4\u7684\uff0c\u5982\u4f55\u89e3\u51b3\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>\u81ea\u52a8\u589e\u91cf\u4ece 0 \u53d8\u4e3a 10000 \u7684\u539f\u56e0\u53ca\u89e3\u51b3\u65b9\u6cd5 mysql \u8868\u7684\u4e3b\u952e\u901a\u5e38\u4ece 0 \u5f00\u59cb\u9012\u589e\uff0c\u4f46\u6709\u65f6\u5019\u5b83\u53ef\u80fd\u4f1a\u7a81\u7136\u53d8\u4e3a 10000 \u7b49\u8f83\u5927\u7684\u503c\u3002\u8fd9\u79cd\u73b0\u8c61\u901a\u5e38\u4e0e\u4ee5\u4e0b\u64cd\u4f5c\u6709\u5173\uff1a \u5bfc\u5165\/\u5bfc\u51fa\u6570\u636e \u5982\u679c\u4ece\u53e6\u4e00\u4e2a\u6570\u636e\u5e93\u5bfc\u5165\u7684\u6570\u636e\u4e2d\u5305\u542b\u6bd4\u5f53\u524d\u4e3b\u952e\u503c\u66f4\u9ad8\u7684 id\uff0c\u5219 mysql \u4f1a\u81ea\u52a8\u5c06\u4e3b\u952e\u9012\u589e\u5230\u5bfc\u5165\u7684\u6570\u636e\u4e2d\u7684\u6700\u9ad8 id \u503c\u3002\u7c7b\u4f3c\u5730\uff0c\u5982\u679c\u4ece\u5f53\u524d\u8868\u4e2d\u5bfc\u51fa\u5e76\u91cd\u65b0\u5bfc\u5165\u6570\u636e\uff0c\u4e3b\u952e\u4e5f\u4f1a\u88ab\u91cd\u7f6e\u4e3a\u5bfc\u51fa\u7684\u6700\u9ad8 id \u503c\u3002 \u5220\u9664\u6570\u636e \u5f53\u4ece\u8868\u4e2d\u5220\u9664\u5927\u91cf\u6570\u636e\u65f6\uff0cmysql \u53ef\u80fd\u4f1a\u4fdd\u7559\u8fd9\u4e9b\u6570\u636e\u5360\u7528\u7684\u95f4\u9699\uff08gap\uff09\uff0c\u4ee5\u4fbf\u540e\u7eed\u63d2\u5165\u7684\u65b0\u6570\u636e\u91cd\u65b0\u4f7f\u7528\u8fd9\u4e9b\u95f4\u9699\u3002\u8fd9\u4f1a\u5bfc\u81f4\u65b0\u63d2\u5165\u7684\u6570\u636e\u4f7f\u7528\u6bd4\u5220\u9664\u6570\u636e\u66f4\u9ad8\u7684\u4e3b\u952e\u503c\u3002 \u4fee\u590d\u65b9\u6cd5 \u8981\u4fee\u6539\u81ea\u52a8\u589e\u91cf\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u6267\u884c\u4ee5\u4e0b\u8bed\u53e5\uff1a ALTER TABLE table_name AUTO_INCREMENT = new_value; \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff0ctable_name \u662f\u8868\u540d\uff0cnew_value \u662f\u8981\u8bbe\u7f6e\u7684\u65b0\u81ea\u52a8\u589e\u91cf\u503c\u3002 \u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u63a7\u5236\u4e3b\u952e\u9012\u589e\u5230\u51e0\u7684\u662f\u8868\u7684 auto_increment \u5c5e\u6027\uff0c\u53ef\u4ee5\u4ece\u8868\u7ed3\u6784\u4e2d\u67e5\u770b\u3002 \u4ee5\u4e0a\u5c31\u662fMySQL \u81ea\u52a8\u589e\u91cf\u7a81\u7136\u53d8\u4e3a 10000\uff0c\u662f\u4ec0\u4e48\u539f\u56e0\u5bfc\u81f4\u7684\uff0c\u5982\u4f55\u89e3\u51b3\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},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-7361","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7361","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=7361"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7361\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}