{"id":25476,"date":"2024-11-24T11:52:27","date_gmt":"2024-11-24T03:52:27","guid":{"rendered":"https:\/\/fwq.ai\/blog\/25476\/"},"modified":"2024-11-24T11:52:27","modified_gmt":"2024-11-24T03:52:27","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e6%9f%a5%e8%af%a2%e5%8c%85%e5%90%ab%e6%97%a5%e6%96%87%e5%81%87%e5%90%8d%e7%9a%84-mysql-%e5%ad%97%e6%ae%b5%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/25476\/","title":{"rendered":"\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u5305\u542b\u65e5\u6587\u5047\u540d\u7684 MySQL \u5b57\u6bb5\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173061922864679.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u5305\u542b\u65e5\u6587\u5047\u540d\u7684 MySQL \u5b57\u6bb5\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u5305\u542b\u65e5\u6587\u5047\u540d\u7684 MySQL \u5b57\u6bb5\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u5305\u542b\u65e5\u6587\u5047\u540d\u7684  \u5b57\u6bb5<\/strong><\/p>\n<p>\u60a8\u5c1d\u8bd5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2 mysql \u8868\u7684 title \u5217\uff0c\u4ee5\u67e5\u627e\u5305\u542b\u65e5\u6587\u5e73\u5047\u540d\u6216\u7247\u5047\u540d\u7684\u6570\u636e\u3002\u4f46\u662f\uff0c\u60a8\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u4f3c\u4e4e\u4e0d\u6b63\u786e\uff0c\u5e76\u4e14\u6ca1\u6709\u5f97\u5230\u9884\u671f\u7ed3\u679c\u3002<\/p>\n<p>\u8981\u6b63\u786e\u67e5\u627e\u5305\u542b\u65e5\u6587\u5047\u540d\u7684 title\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u4ee5\u4e0b\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a<\/p>\n<pre>^.*[\u3041-\u3093\u30a1-\u30f3].*$<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6b64\u6b63\u5219\u8868\u8fbe\u5f0f\u5c06\u5339\u914d\u5305\u542b\u4efb\u4f55\u5e73\u5047\u540d\u6216\u7247\u5047\u540d\u5b57\u7b26\u7684 title\u3002\u4f7f\u7528\u6b64\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u793a\u4f8b\u8bed\u53e5\u5982\u4e0b\uff1a<\/p>\n<pre>select title from table_name where title regexp \"^.*[\u3041-\u3093\u30a1-\u30f3].*$\";<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5982\u679c\u60a8\u5e0c\u671b\u67e5\u627e\u4e0d\u5305\u542b\u4efb\u4f55\u5e73\u5047\u540d\u6216\u7247\u5047\u540d\u5b57\u7b26\u7684 title\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a<\/p>\n<pre>^.*[^\u3041-\u3093\u30a1-\u30f3].*$<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f7f\u7528\u6b64\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u793a\u4f8b\u8bed\u53e5\u5982\u4e0b\uff1a<\/p>\n<pre>SELECT title FROM table_name WHERE title NOT REGEXP \"^.*[\u3041-\u3093\u30a1-\u30f3].*$\";<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u5305\u542b\u65e5\u6587\u5047\u540d\u7684 MySQL \u5b57\u6bb5\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u5305\u542b\u65e5\u6587\u5047\u540d\u7684 \u5b57\u6bb5 \u60a8\u5c1d\u8bd5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2 mysql \u8868\u7684 title \u5217\uff0c\u4ee5\u67e5\u627e\u5305\u542b\u65e5\u6587\u5e73\u5047\u540d\u6216\u7247\u5047\u540d\u7684\u6570\u636e\u3002\u4f46\u662f\uff0c\u60a8\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u4f3c\u4e4e\u4e0d\u6b63\u786e\uff0c\u5e76\u4e14\u6ca1\u6709\u5f97\u5230\u9884\u671f\u7ed3\u679c\u3002 \u8981\u6b63\u786e\u67e5\u627e\u5305\u542b\u65e5\u6587\u5047\u540d\u7684 title\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u4ee5\u4e0b\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a ^.*[\u3041-\u3093\u30a1-\u30f3].*$ \u767b\u5f55\u540e\u590d\u5236 \u6b64\u6b63\u5219\u8868\u8fbe\u5f0f\u5c06\u5339\u914d\u5305\u542b\u4efb\u4f55\u5e73\u5047\u540d\u6216\u7247\u5047\u540d\u5b57\u7b26\u7684 title\u3002\u4f7f\u7528\u6b64\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u793a\u4f8b\u8bed\u53e5\u5982\u4e0b\uff1a select title from table_name where title regexp &#8220;^.*[\u3041-\u3093\u30a1-\u30f3].*$&#8221;; \u767b\u5f55\u540e\u590d\u5236 \u5982\u679c\u60a8\u5e0c\u671b\u67e5\u627e\u4e0d\u5305\u542b\u4efb\u4f55\u5e73\u5047\u540d\u6216\u7247\u5047\u540d\u5b57\u7b26\u7684 title\uff0c\u5219\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a ^.*[^\u3041-\u3093\u30a1-\u30f3].*$ \u767b\u5f55\u540e\u590d\u5236 \u4f7f\u7528\u6b64\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u793a\u4f8b\u8bed\u53e5\u5982\u4e0b\uff1a SELECT title FROM table_name WHERE title NOT REGEXP &#8220;^.*[\u3041-\u3093\u30a1-\u30f3].*$&#8221;; \u767b\u5f55\u540e\u590d\u5236 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u8be2\u5305\u542b\u65e5\u6587\u5047\u540d\u7684 MySQL \u5b57\u6bb5\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\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-25476","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25476","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=25476"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25476\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=25476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=25476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=25476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}