{"id":6835,"date":"2024-11-14T10:02:01","date_gmt":"2024-11-14T02:02:01","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6835\/"},"modified":"2024-11-14T10:02:01","modified_gmt":"2024-11-14T02:02:01","slug":"mysql-%e5%85%a8%e6%96%87%e6%90%9c%e7%b4%a2%e4%b8%ad%e4%b8%ba%e4%bd%95-contains-%e5%87%bd%e6%95%b0%e5%a4%b1%e6%95%88%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6835\/","title":{"rendered":"MySQL \u5168\u6587\u641c\u7d22\u4e2d\u4e3a\u4f55 contains() \u51fd\u6570\u5931\u6548\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/172998811579934.jpg\" class=\"aligncenter\" title=\"MySQL \u5168\u6587\u641c\u7d22\u4e2d\u4e3a\u4f55 contains() \u51fd\u6570\u5931\u6548\uff1f\u63d2\u56fe\" alt=\"MySQL \u5168\u6587\u641c\u7d22\u4e2d\u4e3a\u4f55 contains() \u51fd\u6570\u5931\u6548\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>MySQL Full-Text Search \u4e2d\u4f7f\u7528 contns() \u5931\u8d25<\/strong><\/p>\n<p>\u5728\u4f7f\u7528 MySQL 8.0.26 \u7684\u5168\u6587\u7d22\u5f15\u65f6\uff0cmatch() \u548c against() \u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\uff0c\u4f46 contains() \u4f1a\u63d0\u793a\u9519\u8bef\u3002<\/p>\n<p><strong>\u95ee\u9898\u539f\u56e0<\/strong><\/p>\n<p>contains() \u5e76\u4e0d\u662f MySQL \u4e2d Full-Text Search \u7684\u8bed\u6cd5\u3002contains() \u662f Microsoft SQL Server \u4e2d\u7684\u51fd\u6570\uff0c\u7528\u4e8e\u68c0\u67e5\u5b57\u7b26\u4e32\u4e2d\u662f\u5426\u5305\u542b\u6307\u5b9a\u7684\u5b50\u5b57\u7b26\u4e32\u3002<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n<p>\u5728 MySQL \u4e2d\uff0c\u5168\u6587\u641c\u7d22\u53ea\u80fd\u4f7f\u7528 MATCH (col1,col2,&#8230;) AGAINST (expr [search_modifier]) \u8bed\u6cd5\u3002\u56e0\u6b64\uff0c\u65e0\u6cd5\u4f7f\u7528 contains() \u51fd\u6570\u3002<\/p>\n<p><strong>\u989d\u5916\u63d0\u793a<\/strong><\/p>\n<p>\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u67d0\u4e9b\u4e2d\u6587\u6280\u672f\u535a\u5ba2\u53ef\u80fd\u8bef\u5bfc\u6027\u5730\u4ecb\u7ecd\u4e86 MySQL \u7684\u5168\u6587\u641c\u7d22\u8bed\u6cd5\u3002\u4e3a\u4e86\u5b66\u4e60\u51c6\u786e\u7684\u6280\u672f\u77e5\u8bc6\uff0c\u5efa\u8bae\u76f4\u63a5\u67e5\u9605 MySQL \u5b98\u65b9\u6587\u6863\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fMySQL \u5168\u6587\u641c\u7d22\u4e2d\u4e3a\u4f55 contns() \u51fd\u6570\u5931\u6548\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>MySQL Full-Text Search \u4e2d\u4f7f\u7528 contns() \u5931\u8d25 \u5728\u4f7f\u7528 MySQL 8.0.26 \u7684\u5168\u6587\u7d22\u5f15\u65f6\uff0cmatch() \u548c against() \u53ef\u4ee5\u6b63\u5e38\u4f7f\u7528\uff0c\u4f46 contains() \u4f1a\u63d0\u793a\u9519\u8bef\u3002 \u95ee\u9898\u539f\u56e0 contains() \u5e76\u4e0d\u662f MySQL \u4e2d Full-Text Search \u7684\u8bed\u6cd5\u3002contains() \u662f Microsoft SQL Server \u4e2d\u7684\u51fd\u6570\uff0c\u7528\u4e8e\u68c0\u67e5\u5b57\u7b26\u4e32\u4e2d\u662f\u5426\u5305\u542b\u6307\u5b9a\u7684\u5b50\u5b57\u7b26\u4e32\u3002 \u89e3\u51b3\u65b9\u6848 \u5728 MySQL \u4e2d\uff0c\u5168\u6587\u641c\u7d22\u53ea\u80fd\u4f7f\u7528 MATCH (col1,col2,&#8230;) AGAINST (expr [search_modifier]) \u8bed\u6cd5\u3002\u56e0\u6b64\uff0c\u65e0\u6cd5\u4f7f\u7528 contains() \u51fd\u6570\u3002 \u989d\u5916\u63d0\u793a \u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u67d0\u4e9b\u4e2d\u6587\u6280\u672f\u535a\u5ba2\u53ef\u80fd\u8bef\u5bfc\u6027\u5730\u4ecb\u7ecd\u4e86 MySQL \u7684\u5168\u6587\u641c\u7d22\u8bed\u6cd5\u3002\u4e3a\u4e86\u5b66\u4e60\u51c6\u786e\u7684\u6280\u672f\u77e5\u8bc6\uff0c\u5efa\u8bae\u76f4\u63a5\u67e5\u9605 MySQL \u5b98\u65b9\u6587\u6863\u3002 \u4ee5\u4e0a\u5c31\u662fMySQL \u5168\u6587\u641c\u7d22\u4e2d\u4e3a\u4f55 contns() \u51fd\u6570\u5931\u6548\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-6835","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6835","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=6835"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6835\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}