{"id":7555,"date":"2024-11-14T11:53:10","date_gmt":"2024-11-14T03:53:10","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7555\/"},"modified":"2024-11-14T11:53:10","modified_gmt":"2024-11-14T03:53:10","slug":"mysql-%e4%b8%ad-where-%e5%ad%97%e6%ae%b5-%e6%9d%a1%e4%bb%b6%e4%b8%ba%e4%bd%95%e8%bf%87%e6%bb%a4%e6%8e%89%e5%ad%97%e6%af%8d%e5%92%8c-0-%e5%bc%80%e5%a4%b4%e7%9a%84%e8%ae%b0%e5%bd%95%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7555\/","title":{"rendered":"MySQL \u4e2d WHERE \u5b57\u6bb5 \u6761\u4ef6\u4e3a\u4f55\u8fc7\u6ee4\u6389\u5b57\u6bcd\u548c 0 \u5f00\u5934\u7684\u8bb0\u5f55\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173098657586231.jpg\" class=\"aligncenter\" title=\"MySQL \u4e2d WHERE \u5b57\u6bb5 \u6761\u4ef6\u4e3a\u4f55\u8fc7\u6ee4\u6389\u5b57\u6bcd\u548c 0 \u5f00\u5934\u7684\u8bb0\u5f55\uff1f\u63d2\u56fe\" alt=\"MySQL \u4e2d WHERE \u5b57\u6bb5 \u6761\u4ef6\u4e3a\u4f55\u8fc7\u6ee4\u6389\u5b57\u6bcd\u548c 0 \u5f00\u5934\u7684\u8bb0\u5f55\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>MySQL\u4e2dwhere\u5b57\u6bb5\u6761\u4ef6\u7684\u7591\u60d1<\/strong><\/p>\n<p>\u7591\u60d1\uff1a\u5728SQL\u4e2d\uff0c\u4f7f\u7528where \u8fd9\u79cd\u5f62\u5f0f\u7684\u6761\u4ef6\uff0c\u80fd\u591f\u67e5\u8be2\u51fa\u6570\u5b57\u5f00\u5934\u7684\u90e8\u5206\u6570\u636e\uff0c\u4f46\u4f1a\u8fc7\u6ee4\u6389\u5b57\u6bcd\u548c0\u5f00\u5934\u7684\u3002\u8fd9\u662f\u4e3a\u4f55\uff1f<\/p>\n<p>\u89e3\u7b54\uff1a<\/p>\n<p>MySQL\u7684where\u6761\u4ef6\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u4f46\u4e0d\u80fd\u4f7f\u7528\u3002\u672c\u4f8b\u4e2d\uff0c\u5b57\u6bb5\u672c\u8eab\u88ab\u89c6\u4e3a\u4e00\u4e2a\u8868\u8fbe\u5f0f\uff0c\u8be5\u8868\u8fbe\u5f0f\u7684\u503c\u80fd\u8f6c\u4e3atrue\u65f6\u6761\u4ef6\u6210\u7acb\u3002<\/p>\n<p>MySQL\u6587\u6863\u6307\u51fa\uff0c\u201c\u5982\u679c\u6ca1\u6709WHERE\u5b50\u53e5\uff0c\u8be5\u8bed\u53e5\u4f1a\u9009\u62e9\u6240\u6709\u7684\u8bb0\u5f55\u201d\u3002\u56e0\u6b64\uff0cwhere \u5b9e\u9645\u4e0a\u662fWHERE IS NOT NULL\uff0c\u5373\u5b57\u6bb5\u4e0d\u4e3a\u7a7a\u3002<\/p>\n<p>\u53ea\u6709\u6570\u5b57\u5f00\u5934\u7684\u5b57\u6bb5\u503c\u5728\u8f6c\u6362\u4e3a\u771f\u503c\u65f6\u624d\u4e3atrue\uff0c\u800c\u5b57\u6bcd\u548c0\u5f00\u5934\u7684\u5b57\u6bb5\u503c\u65e0\u6cd5\u8f6c\u6362\u6210\u771f\u503c\uff0c\u56e0\u6b64\u88ab\u8fc7\u6ee4\u6389\u4e86\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fMySQL \u4e2d WHERE \u5b57\u6bb5 \u6761\u4ef6\u4e3a\u4f55\u8fc7\u6ee4\u6389\u5b57\u6bcd\u548c 0 \u5f00\u5934\u7684\u8bb0\u5f55\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\u4e2dwhere\u5b57\u6bb5\u6761\u4ef6\u7684\u7591\u60d1 \u7591\u60d1\uff1a\u5728SQL\u4e2d\uff0c\u4f7f\u7528where \u8fd9\u79cd\u5f62\u5f0f\u7684\u6761\u4ef6\uff0c\u80fd\u591f\u67e5\u8be2\u51fa\u6570\u5b57\u5f00\u5934\u7684\u90e8\u5206\u6570\u636e\uff0c\u4f46\u4f1a\u8fc7\u6ee4\u6389\u5b57\u6bcd\u548c0\u5f00\u5934\u7684\u3002\u8fd9\u662f\u4e3a\u4f55\uff1f \u89e3\u7b54\uff1a MySQL\u7684where\u6761\u4ef6\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u51fd\u6570\u6216\u64cd\u4f5c\u7b26\uff0c\u4f46\u4e0d\u80fd\u4f7f\u7528\u3002\u672c\u4f8b\u4e2d\uff0c\u5b57\u6bb5\u672c\u8eab\u88ab\u89c6\u4e3a\u4e00\u4e2a\u8868\u8fbe\u5f0f\uff0c\u8be5\u8868\u8fbe\u5f0f\u7684\u503c\u80fd\u8f6c\u4e3atrue\u65f6\u6761\u4ef6\u6210\u7acb\u3002 MySQL\u6587\u6863\u6307\u51fa\uff0c\u201c\u5982\u679c\u6ca1\u6709WHERE\u5b50\u53e5\uff0c\u8be5\u8bed\u53e5\u4f1a\u9009\u62e9\u6240\u6709\u7684\u8bb0\u5f55\u201d\u3002\u56e0\u6b64\uff0cwhere \u5b9e\u9645\u4e0a\u662fWHERE IS NOT NULL\uff0c\u5373\u5b57\u6bb5\u4e0d\u4e3a\u7a7a\u3002 \u53ea\u6709\u6570\u5b57\u5f00\u5934\u7684\u5b57\u6bb5\u503c\u5728\u8f6c\u6362\u4e3a\u771f\u503c\u65f6\u624d\u4e3atrue\uff0c\u800c\u5b57\u6bcd\u548c0\u5f00\u5934\u7684\u5b57\u6bb5\u503c\u65e0\u6cd5\u8f6c\u6362\u6210\u771f\u503c\uff0c\u56e0\u6b64\u88ab\u8fc7\u6ee4\u6389\u4e86\u3002 \u4ee5\u4e0a\u5c31\u662fMySQL \u4e2d WHERE \u5b57\u6bb5 \u6761\u4ef6\u4e3a\u4f55\u8fc7\u6ee4\u6389\u5b57\u6bcd\u548c 0 \u5f00\u5934\u7684\u8bb0\u5f55\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-7555","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7555","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=7555"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7555\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7555"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7555"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}