{"id":7033,"date":"2024-11-14T15:27:56","date_gmt":"2024-11-14T07:27:56","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7033\/"},"modified":"2024-11-14T15:27:56","modified_gmt":"2024-11-14T07:27:56","slug":"mysql-%e5%ad%98%e5%82%a8%e8%bf%87%e7%a8%8b-num-%e5%80%bc%e5%a7%8b%e7%bb%88%e4%b8%ba-0%ef%bc%8c%e9%97%ae%e9%a2%98%e5%87%ba%e5%9c%a8%e5%93%aa%e9%87%8c%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7033\/","title":{"rendered":"MySQL \u5b58\u50a8\u8fc7\u7a0b Num \u503c\u59cb\u7ec8\u4e3a 0\uff0c\u95ee\u9898\u51fa\u5728\u54ea\u91cc\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173033860186691.jpg\" class=\"aligncenter\" title=\"MySQL \u5b58\u50a8\u8fc7\u7a0b Num \u503c\u59cb\u7ec8\u4e3a 0\uff0c\u95ee\u9898\u51fa\u5728\u54ea\u91cc\uff1f\u63d2\u56fe\" alt=\"MySQL \u5b58\u50a8\u8fc7\u7a0b Num \u503c\u59cb\u7ec8\u4e3a 0\uff0c\u95ee\u9898\u51fa\u5728\u54ea\u91cc\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4e3a\u4ec0\u4e48\u8fd9\u4e2a  \u5b58\u50a8\u8fc7\u7a0b\u8f93\u51fa\u7684 num \u6c38\u8fdc\u90fd\u662f 0\uff1f<\/strong><\/p>\n<p>\u5728\u4e00\u4efd\u65e8\u5728\u7edf\u8ba1\u5206\u6570\u4f4e\u4e8e 60 \u5206\u7684\u5b66\u751f\u4eba\u6570\u7684\u5b58\u50a8\u8fc7\u7a0b\u4e2d\uff0c\u51fa\u73b0\u4e86 num \u59cb\u7ec8\u4e3a 0 \u7684\u95ee\u9898\u3002<\/p>\n<p>\u4ed4\u7ec6\u68c0\u67e5\u540e\u53d1\u73b0\uff0c\u95ee\u9898\u51fa\u5728 ttempsno \u53d8\u91cf\u7684\u58f0\u660e\u4e2d\uff1a<\/p>\n<pre>declare tempsno varchar(30);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5f53 ttempsno \u88ab\u7528\u4f5c\u6761\u4ef6\u5224\u65ad\u65f6\uff0c\u5176\u503c\u4e3a null\uff0c\u5bfc\u81f4 if \u8bed\u53e5\u65e0\u6cd5\u6267\u884c\u3002<\/p>\n<p>\u6b63\u786e\u7684\u58f0\u660e\u65b9\u5f0f\u5e94\u4e3a\uff1a<\/p>\n<pre>declare TempSno varchar(30) default '';<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u73b0\u5728\uff0c\u5982\u679c tempsno \u4e3a null\uff0c\u5219\u5c06\u521d\u59cb\u5316\u4e3a\u7a7a\u5b57\u7b26\u4e32\uff0c\u4ece\u800c\u5141\u8bb8 if \u8bed\u53e5\u6b63\u786e\u6267\u884c\u3002<\/p>\n<p>\u56e0\u6b64\uff0cnum \u503c\u624d\u80fd\u51c6\u786e\u7edf\u8ba1\u51fa\u6765\uff0c\u53cd\u6620\u51fa\u7b26\u5408\u6761\u4ef6\u7684\u5b66\u751f\u4eba\u6570\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fMySQL \u5b58\u50a8\u8fc7\u7a0b Num \u503c\u59cb\u7ec8\u4e3a 0\uff0c\u95ee\u9898\u51fa\u5728\u54ea\u91cc\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>\u4e3a\u4ec0\u4e48\u8fd9\u4e2a \u5b58\u50a8\u8fc7\u7a0b\u8f93\u51fa\u7684 num \u6c38\u8fdc\u90fd\u662f 0\uff1f \u5728\u4e00\u4efd\u65e8\u5728\u7edf\u8ba1\u5206\u6570\u4f4e\u4e8e 60 \u5206\u7684\u5b66\u751f\u4eba\u6570\u7684\u5b58\u50a8\u8fc7\u7a0b\u4e2d\uff0c\u51fa\u73b0\u4e86 num \u59cb\u7ec8\u4e3a 0 \u7684\u95ee\u9898\u3002 \u4ed4\u7ec6\u68c0\u67e5\u540e\u53d1\u73b0\uff0c\u95ee\u9898\u51fa\u5728 ttempsno \u53d8\u91cf\u7684\u58f0\u660e\u4e2d\uff1a declare tempsno varchar(30); \u767b\u5f55\u540e\u590d\u5236 \u5f53 ttempsno \u88ab\u7528\u4f5c\u6761\u4ef6\u5224\u65ad\u65f6\uff0c\u5176\u503c\u4e3a null\uff0c\u5bfc\u81f4 if \u8bed\u53e5\u65e0\u6cd5\u6267\u884c\u3002 \u6b63\u786e\u7684\u58f0\u660e\u65b9\u5f0f\u5e94\u4e3a\uff1a declare TempSno varchar(30) default &#8221;; \u767b\u5f55\u540e\u590d\u5236 \u73b0\u5728\uff0c\u5982\u679c tempsno \u4e3a null\uff0c\u5219\u5c06\u521d\u59cb\u5316\u4e3a\u7a7a\u5b57\u7b26\u4e32\uff0c\u4ece\u800c\u5141\u8bb8 if \u8bed\u53e5\u6b63\u786e\u6267\u884c\u3002 \u56e0\u6b64\uff0cnum \u503c\u624d\u80fd\u51c6\u786e\u7edf\u8ba1\u51fa\u6765\uff0c\u53cd\u6620\u51fa\u7b26\u5408\u6761\u4ef6\u7684\u5b66\u751f\u4eba\u6570\u3002 \u4ee5\u4e0a\u5c31\u662fMySQL \u5b58\u50a8\u8fc7\u7a0b Num \u503c\u59cb\u7ec8\u4e3a 0\uff0c\u95ee\u9898\u51fa\u5728\u54ea\u91cc\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-7033","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7033","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=7033"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7033\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}