{"id":112,"date":"2024-11-05T07:42:16","date_gmt":"2024-11-04T23:42:16","guid":{"rendered":"https:\/\/iphp.top\/?p=112"},"modified":"2024-11-14T07:43:33","modified_gmt":"2024-11-13T23:43:33","slug":"%e8%ae%b0%e4%b8%80%e6%ac%a1-mysql-%e4%b8%ad%e5%ad%97%e6%ae%b5%e5%80%bc%e4%b8%ba-null-%e5%bc%95%e5%8f%91%e7%9a%84%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/iphp.top\/?p=112","title":{"rendered":"\u8bb0\u4e00\u6b21 MySQL \u4e2d\u5b57\u6bb5\u503c\u4e3a null \u5f15\u53d1\u7684\u95ee\u9898"},"content":{"rendered":"\n<p>\u5982\u679c\u4e00\u4e2a\u5b57\u6bb5\u7684\u503c\u4e3a null\uff0c\u8fd9\u4e2a\u65f6\u5019\u7528 count \u51fd\u6570\u7edf\u8ba1\u8fd9\u4e2a\u5b57\u6bb5\u7684\u65f6\u5019\uff0c\u8fd9\u884c\u8bb0\u5f55\u662f\u4e0d\u4f1a\u88ab\u7edf\u8ba1\u5230\u7684\uff0c\u8fd9\u4e2a\u4e4b\u524d\u662f\u77e5\u9053\u7684\uff0c\u4e0d\u77e5\u9053\u7684\u662f\uff0cwhere \u6761\u4ef6\u91cc\u4e0d\u7b49\u4e8e\u4e0d\u4f1a\u628a null \u7684\u884c\u67e5\u627e\u51fa\u6765\u3002<\/p>\n\n\n\n<p>\u6628\u5929\u6709\u4e2a\u5de5\u4f5c\uff0c\u6709\u90e8\u5206\u5386\u53f2\u6570\u636e\u7684\u67d0\u4e2a\u5b57\u6bb5\u7684\u503c\u6709\u53ef\u80fd\u662f\u9519\u7684\uff0c\u9700\u8981\u5199\u811a\u672c\u66f4\u65b0\uff0c\u628a\u9519\u8bef\u6570\u636e\u67e5\u627e\u51fa\u6765\u540e\u66f4\u65b0\u6210\u6b63\u786e\u7684\uff0c\u4e8e\u662f\u5c31\u5199\u4e86\u4e0b\u9762\u7684 sql\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\nselect * from table_name where column &lt;&gt; 123\n<\/pre><\/div>\n\n\n<p>\u6700\u7ec8\u4fee\u590d\u5b8c\u6570\u636e\u540e\uff0c\u4e00\u5bf9\u6570\uff0c\u53d1\u73b0\u8fd8\u662f\u4e0d\u5bf9\uff0c\u4e8e\u662f\u5f00\u59cb\u627e\u539f\u56e0\uff0c\u6700\u7ec8\u60f3\u5230\u6709\u53ef\u80fd\u662f sql \u7684 where \u6761\u4ef6\u67e5\u627e\u4e0d\u51fa\u503c\u4e3a null \u7684\u884c\uff0c\u7ecf\u8fc7\u9a8c\u8bc1\uff0c\u679c\u7136\u5982\u6b64\u3002<\/p>\n\n\n\n<p>\u7136\u540e\u518d\u4fee\u6539sql \u4e3a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: sql; title: ; notranslate\" title=\"\">\nselect * from table_name where column &lt;&gt; 123 or column is null\n<\/pre><\/div>\n\n\n<p>\u89e3\u51b3\u95ee\u9898\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u4e00\u4e2a\u5b57\u6bb5\u7684\u503c\u4e3a null\uff0c\u8fd9\u4e2a\u65f6\u5019\u7528 count \u51fd\u6570\u7edf\u8ba1\u8fd9\u4e2a\u5b57\u6bb5\u7684\u65f6\u5019\uff0c\u8fd9\u884c\u8bb0\u5f55\u662f\u4e0d\u4f1a\u88ab\u7edf\u8ba1\u5230\u7684\uff0c\u8fd9\u4e2a\u4e4b\u524d\u662f\u77e5\u9053\u7684\uff0c\u4e0d\u77e5\u9053\u7684\u662f\uff0cwhere \u6761\u4ef6\u91cc\u4e0d\u7b49\u4e8e\u4e0d\u4f1a\u628a null \u7684\u884c\u67e5\u627e\u51fa\u6765\u3002 \u6628\u5929\u6709\u4e2a\u5de5\u4f5c\uff0c\u6709\u90e8\u5206\u5386\u53f2\u6570\u636e\u7684\u67d0\u4e2a\u5b57\u6bb5\u7684\u503c\u6709\u53ef\u80fd\u662f\u9519\u7684\uff0c\u9700\u8981\u5199\u811a\u672c\u66f4 &hellip; <a href=\"https:\/\/iphp.top\/?p=112\">\u9605\u8bfb\u5168\u6587 <i class=\"fa fa-share-square-o\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-112","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/iphp.top\/index.php?rest_route=\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iphp.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iphp.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iphp.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iphp.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=112"}],"version-history":[{"count":1,"href":"https:\/\/iphp.top\/index.php?rest_route=\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":114,"href":"https:\/\/iphp.top\/index.php?rest_route=\/wp\/v2\/posts\/112\/revisions\/114"}],"wp:attachment":[{"href":"https:\/\/iphp.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iphp.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iphp.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}