{"id":7734,"date":"2024-11-14T12:46:14","date_gmt":"2024-11-14T04:46:14","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7734\/"},"modified":"2024-11-14T12:46:14","modified_gmt":"2024-11-14T04:46:14","slug":"mysql-%e4%b8%ad-is-true-%e5%92%8c-true-%e8%bf%90%e7%ae%97%e7%ac%a6%e7%9a%84%e7%bb%93%e6%9e%9c%e4%b8%ba%e4%bd%95%e4%b8%8d%e4%b8%80%e8%87%b4%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7734\/","title":{"rendered":"MySQL \u4e2d IS TRUE \u548c = TRUE \u8fd0\u7b97\u7b26\u7684\u7ed3\u679c\u4e3a\u4f55\u4e0d\u4e00\u81f4\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173120822944675.jpg\" class=\"aligncenter\" title=\"MySQL \u4e2d IS TRUE \u548c = TRUE \u8fd0\u7b97\u7b26\u7684\u7ed3\u679c\u4e3a\u4f55\u4e0d\u4e00\u81f4\uff1f\u63d2\u56fe\" alt=\"MySQL \u4e2d IS TRUE \u548c = TRUE \u8fd0\u7b97\u7b26\u7684\u7ed3\u679c\u4e3a\u4f55\u4e0d\u4e00\u81f4\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>MySQL \u4e2d IS TRUE \u548c = True \u7ed3\u679c\u4e0d\u4e00\u81f4\u7684\u539f\u56e0<\/strong><\/p>\n<p>\u5728 MySQL \u4e2d\uff0cIS TRUE \u548c = True \u8fd0\u7b97\u7b26\u7528\u4e8e\u6bd4\u8f83\u5e03\u5c14\u503c\u3002\u7136\u800c\uff0c\u5b83\u4eec\u7684\u7ed3\u679c\u53ef\u80fd\u4e0d\u540c\uff0c\u9020\u6210\u8fd9\u79cd\u5dee\u5f02\u7684\u539f\u56e0\u5982\u4e0b\uff1a<\/p>\n<p><strong>= True\uff1a\u6570\u503c\u6bd4\u8f83<\/strong><\/p>\n<p>= True \u8fd0\u7b97\u7b26\u6267\u884c\u6570\u503c\u6bd4\u8f83\u3002\u5728 MySQL \u4e2d\uff0cTrue \u8868\u793a\u975e\u96f6\u6574\u6570 1\u3002\u56e0\u6b64\uff0c\u5177\u6709\u975e\u96f6\u503c\uff08\u5982 127\uff09\u7684\u5b57\u6bb5\u4e0e True \u7684\u6bd4\u8f83\u7ed3\u679c\u4e3a\u771f\u3002<\/p>\n<p><strong>IS TRUE\uff1a\u771f\u5047\u5224\u65ad<\/strong><\/p>\n<p>\u53e6\u4e00\u65b9\u9762\uff0cIS TRUE \u8fd0\u7b97\u7b26\u6267\u884c\u771f\u5047\u5224\u65ad\u3002\u5b83\u68c0\u67e5\u5b57\u6bb5\u662f\u5426\u4e3a\u975e\u96f6\u3002\u5982\u679c\u5b57\u6bb5\u4e0d\u662f\u96f6\uff0c\u5219 IS TRUE \u8fd4\u56de\u771f\u503c\uff0c\u5426\u5219\u8fd4\u56de\u5047\u503c\u3002<\/p>\n<p><strong>\u793a\u4f8b<\/strong><\/p>\n<p>\u793a\u4f8b\u4e2d\u7684 user \u8868\u5305\u542b\u4e00\u4e2a is_deleted \u5b57\u6bb5\uff0c\u8be5\u5b57\u6bb5\u662f\u5c0f\u6574\u6570\u7c7b\u578b\uff08Byte\uff09\uff0c\u53ef\u4ee5\u5b58\u50a8 0 \u5230 255 \u7684\u503c\u3002<\/p>\n<p>\u5728\u67e5\u8be2 SELECT * FROM user WHERE is_deleted IS TRUE \u65f6\uff0c\u8be5\u67e5\u8be2\u8fd4\u56de\u6240\u6709 is_deleted \u5b57\u6bb5\u975e\u96f6\u7684\u884c\uff0c\u56e0\u4e3a\u975e\u96f6\u503c\u6ee1\u8db3\u771f\u5047\u5224\u65ad\u3002<\/p>\n<p>\u7136\u800c\uff0c\u5728\u67e5\u8be2 SELECT * FROM user WHERE is_deleted = TRUE \u65f6\uff0c\u8be5\u67e5\u8be2\u8fd4\u56de\u6240\u6709 is_deleted \u5b57\u6bb5\u7684\u503c\u4e0e 1 \u76f8\u7b49\u7684\u884c\u7684\uff0c\u5b83\u6392\u9664\u5177\u6709\u975e\u96f6\u503c\u7684\u3001\u4e0d\u7b49\u4e8e 1 \u7684\u884c\u3002<\/p>\n<p><strong>\u603b\u7ed3<\/strong><\/p>\n<p>\u56e0\u6b64\uff0cIS TRUE \u548c = True \u8fd0\u7b97\u7b26\u5728 MySQL \u4e2d\u7528\u4e8e\u4e0d\u540c\u7684\u76ee\u7684\u3002IS TRUE \u7528\u4e8e\u5224\u65ad\u771f\u5047\uff0c\u800c = True \u7528\u4e8e\u6570\u503c\u6bd4\u8f83\u3002\u4e86\u89e3\u5b83\u4eec\u7684\u5dee\u5f02\u5bf9\u4e8e\u7f16\u5199\u6b63\u786e\u7684 MySQL \u67e5\u8be2\u81f3\u5173\u91cd\u8981\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fMySQL \u4e2d IS TRUE \u548c = TRUE \u8fd0\u7b97\u7b26\u7684\u7ed3\u679c\u4e3a\u4f55\u4e0d\u4e00\u81f4\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 \u4e2d IS TRUE \u548c = True \u7ed3\u679c\u4e0d\u4e00\u81f4\u7684\u539f\u56e0 \u5728 MySQL \u4e2d\uff0cIS TRUE \u548c = True \u8fd0\u7b97\u7b26\u7528\u4e8e\u6bd4\u8f83\u5e03\u5c14\u503c\u3002\u7136\u800c\uff0c\u5b83\u4eec\u7684\u7ed3\u679c\u53ef\u80fd\u4e0d\u540c\uff0c\u9020\u6210\u8fd9\u79cd\u5dee\u5f02\u7684\u539f\u56e0\u5982\u4e0b\uff1a = True\uff1a\u6570\u503c\u6bd4\u8f83 = True \u8fd0\u7b97\u7b26\u6267\u884c\u6570\u503c\u6bd4\u8f83\u3002\u5728 MySQL \u4e2d\uff0cTrue \u8868\u793a\u975e\u96f6\u6574\u6570 1\u3002\u56e0\u6b64\uff0c\u5177\u6709\u975e\u96f6\u503c\uff08\u5982 127\uff09\u7684\u5b57\u6bb5\u4e0e True \u7684\u6bd4\u8f83\u7ed3\u679c\u4e3a\u771f\u3002 IS TRUE\uff1a\u771f\u5047\u5224\u65ad \u53e6\u4e00\u65b9\u9762\uff0cIS TRUE \u8fd0\u7b97\u7b26\u6267\u884c\u771f\u5047\u5224\u65ad\u3002\u5b83\u68c0\u67e5\u5b57\u6bb5\u662f\u5426\u4e3a\u975e\u96f6\u3002\u5982\u679c\u5b57\u6bb5\u4e0d\u662f\u96f6\uff0c\u5219 IS TRUE \u8fd4\u56de\u771f\u503c\uff0c\u5426\u5219\u8fd4\u56de\u5047\u503c\u3002 \u793a\u4f8b \u793a\u4f8b\u4e2d\u7684 user \u8868\u5305\u542b\u4e00\u4e2a is_deleted \u5b57\u6bb5\uff0c\u8be5\u5b57\u6bb5\u662f\u5c0f\u6574\u6570\u7c7b\u578b\uff08Byte\uff09\uff0c\u53ef\u4ee5\u5b58\u50a8 0 \u5230 255 \u7684\u503c\u3002 \u5728\u67e5\u8be2 SELECT * FROM user WHERE is_deleted IS TRUE [&hellip;]<\/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-7734","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7734","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=7734"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7734\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}