{"id":6738,"date":"2024-11-14T13:37:16","date_gmt":"2024-11-14T05:37:16","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6738\/"},"modified":"2024-11-14T13:37:16","modified_gmt":"2024-11-14T05:37:16","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8%e5%90%8c%e4%b8%80%e6%95%b0%e6%8d%ae%e5%ba%93%e5%ae%9e%e4%be%8b%e4%b8%ad%e6%89%b9%e9%87%8f%e4%bf%ae%e6%94%b9%e4%b8%8d%e5%90%8c%e5%ba%93%e4%b8%ad%e7%9a%84%e7%9b%b8%e5%90%8c","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6738\/","title":{"rendered":"\u5982\u4f55\u5728\u540c\u4e00\u6570\u636e\u5e93\u5b9e\u4f8b\u4e2d\u6279\u91cf\u4fee\u6539\u4e0d\u540c\u5e93\u4e2d\u7684\u76f8\u540c\u8868\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/172985256450928.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5728\u540c\u4e00\u6570\u636e\u5e93\u5b9e\u4f8b\u4e2d\u6279\u91cf\u4fee\u6539\u4e0d\u540c\u5e93\u4e2d\u7684\u76f8\u540c\u8868\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5728\u540c\u4e00\u6570\u636e\u5e93\u5b9e\u4f8b\u4e2d\u6279\u91cf\u4fee\u6539\u4e0d\u540c\u5e93\u4e2d\u7684\u76f8\u540c\u8868\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u540c\u4e00\u6570\u636e\u5e93\u5b9e\u4f8b\u4fee\u6539\u591a\u4e2a\u5e93\u4e2d\u76f8\u540c\u8868<\/strong><\/p>\n<p>\u5bf9\u4e8e\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u5b9e\u4f8b\u7684\u4e0d\u540c\u5e93\u4e2d\u62e5\u6709\u540c\u4e00\u5f20\u8868\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b sql \u8bed\u53e5\u6279\u91cf\u4fee\u6539\u6240\u6709\u5e93\u4e2d\u8868\u7684\u8bb0\u5f55\uff1a<\/p>\n<pre>select * from information_schema.tables where table_name = 'undo_log';<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6267\u884c\u6b64\u8bed\u53e5\u53ef\u4ee5\u83b7\u53d6\u6240\u6709\u5e93\u4e2d\u5b58\u5728\u6307\u5b9a\u8868\u540d\u7684\u8868\u683c\u4fe1\u606f\u3002\u968f\u540e\uff0c\u53ef\u4ee5\u6839\u636e\u67e5\u8be2\u7ed3\u679c\u9010\u4e2a\u4fee\u6539\u6bcf\u4e2a\u5e93\u4e2d\u7684\u76ee\u6807\u8868\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>use db1;\nupdate undo_log set column_name = 'new_value' where condition;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5176\u4e2d\uff0cdb1 \u4e3a\u5176\u4e2d\u4e00\u4e2a\u5e93\u540d\uff0ccolumn_name \u4e3a\u9700\u8981\u4fee\u6539\u7684\u5217\u540d\uff0cnew_value \u4e3a\u65b0\u7684\u503c\uff0ccondition \u4e3a\u4fee\u6539\u6761\u4ef6\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u5982\u679c\u6570\u636e\u5e93\u7528\u6237\u62e5\u6709\u8f83\u9ad8\u6743\u9650\uff0c\u8fd8\u53ef\u4ee5\u76f4\u63a5\u5bf9\u6240\u6709\u5e93\u4e2d\u7684\u76ee\u6807\u8868\u8fdb\u884c\u6279\u91cf\u64cd\u4f5c\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>UPDATE information_schema.TABLES SET column_name = 'new_value' WHERE TABLE_NAME = 'undo_log';<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u9700\u8981\u6ce8\u610f\uff0c\u8fd9\u79cd\u64cd\u4f5c\u6d89\u53ca\u5bf9\u6570\u636e\u5e93\u7cfb\u7edf\u8868\u7684\u4fee\u6539\uff0c\u53ef\u80fd\u4f1a\u5e26\u6765\u98ce\u9669\uff0c\u56e0\u6b64\u5728\u6267\u884c\u524d\u5e94\u505a\u597d\u5907\u4efd\u5de5\u4f5c\u5e76\u8c28\u614e\u64cd\u4f5c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728\u540c\u4e00\u6570\u636e\u5e93\u5b9e\u4f8b\u4e2d\u6279\u91cf\u4fee\u6539\u4e0d\u540c\u5e93\u4e2d\u7684\u76f8\u540c\u8868\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>\u540c\u4e00\u6570\u636e\u5e93\u5b9e\u4f8b\u4fee\u6539\u591a\u4e2a\u5e93\u4e2d\u76f8\u540c\u8868 \u5bf9\u4e8e\u540c\u4e00\u4e2a\u6570\u636e\u5e93\u5b9e\u4f8b\u7684\u4e0d\u540c\u5e93\u4e2d\u62e5\u6709\u540c\u4e00\u5f20\u8868\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b sql \u8bed\u53e5\u6279\u91cf\u4fee\u6539\u6240\u6709\u5e93\u4e2d\u8868\u7684\u8bb0\u5f55\uff1a select * from information_schema.tables where table_name = &#8216;undo_log&#8217;; \u767b\u5f55\u540e\u590d\u5236 \u6267\u884c\u6b64\u8bed\u53e5\u53ef\u4ee5\u83b7\u53d6\u6240\u6709\u5e93\u4e2d\u5b58\u5728\u6307\u5b9a\u8868\u540d\u7684\u8868\u683c\u4fe1\u606f\u3002\u968f\u540e\uff0c\u53ef\u4ee5\u6839\u636e\u67e5\u8be2\u7ed3\u679c\u9010\u4e2a\u4fee\u6539\u6bcf\u4e2a\u5e93\u4e2d\u7684\u76ee\u6807\u8868\uff0c\u4f8b\u5982\uff1a use db1; update undo_log set column_name = &#8216;new_value&#8217; where condition; \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff0cdb1 \u4e3a\u5176\u4e2d\u4e00\u4e2a\u5e93\u540d\uff0ccolumn_name \u4e3a\u9700\u8981\u4fee\u6539\u7684\u5217\u540d\uff0cnew_value \u4e3a\u65b0\u7684\u503c\uff0ccondition \u4e3a\u4fee\u6539\u6761\u4ef6\u3002 \u6b64\u5916\uff0c\u5982\u679c\u6570\u636e\u5e93\u7528\u6237\u62e5\u6709\u8f83\u9ad8\u6743\u9650\uff0c\u8fd8\u53ef\u4ee5\u76f4\u63a5\u5bf9\u6240\u6709\u5e93\u4e2d\u7684\u76ee\u6807\u8868\u8fdb\u884c\u6279\u91cf\u64cd\u4f5c\uff0c\u4f8b\u5982\uff1a UPDATE information_schema.TABLES SET column_name = &#8216;new_value&#8217; WHERE TABLE_NAME = &#8216;undo_log&#8217;; \u767b\u5f55\u540e\u590d\u5236 \u9700\u8981\u6ce8\u610f\uff0c\u8fd9\u79cd\u64cd\u4f5c\u6d89\u53ca\u5bf9\u6570\u636e\u5e93\u7cfb\u7edf\u8868\u7684\u4fee\u6539\uff0c\u53ef\u80fd\u4f1a\u5e26\u6765\u98ce\u9669\uff0c\u56e0\u6b64\u5728\u6267\u884c\u524d\u5e94\u505a\u597d\u5907\u4efd\u5de5\u4f5c\u5e76\u8c28\u614e\u64cd\u4f5c\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728\u540c\u4e00\u6570\u636e\u5e93\u5b9e\u4f8b\u4e2d\u6279\u91cf\u4fee\u6539\u4e0d\u540c\u5e93\u4e2d\u7684\u76f8\u540c\u8868\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-6738","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6738","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=6738"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6738\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}