{"id":25393,"date":"2024-11-24T13:06:38","date_gmt":"2024-11-24T05:06:38","guid":{"rendered":"https:\/\/fwq.ai\/blog\/25393\/"},"modified":"2024-11-24T13:06:38","modified_gmt":"2024-11-24T05:06:38","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e7%9a%84-sql-%e6%9b%b4%e6%96%b0%e6%93%8d%e4%bd%9c%e5%81%b6%e5%b0%94%e4%bc%9a%e6%8a%a5-error-invalid-input-syntax-for-integer-0-00-%e9%94%99%e8%af%af-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/25393\/","title":{"rendered":"\u4e3a\u4ec0\u4e48\u6211\u7684 SQL \u66f4\u65b0\u64cd\u4f5c\u5076\u5c14\u4f1a\u62a5 &#8220;ERROR: invalid input syntax for integer: &#8220;0.00&#8221;&#8221; \u9519\u8bef\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173060589453019.jpg\" class=\"aligncenter\" title=\"\u4e3a\u4ec0\u4e48\u6211\u7684 SQL \u66f4\u65b0\u64cd\u4f5c\u5076\u5c14\u4f1a\u62a5 &#8220;ERROR: invalid input syntax for integer: &#8220;0.00&#8221;&#8221; \u9519\u8bef\uff1f\u63d2\u56fe\" alt=\"\u4e3a\u4ec0\u4e48\u6211\u7684 SQL \u66f4\u65b0\u64cd\u4f5c\u5076\u5c14\u4f1a\u62a5 &#8220;ERROR: invalid input syntax for integer: &#8220;0.00&#8221;&#8221; \u9519\u8bef\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>SQL \u66f4\u65b0\u51fa\u73b0\u95f4\u6b47\u6027\u9519\u8bef\uff1a&#8221;ERROR: invalid input syntax for integer: &#8220;0.00&#8221;\uff1f&#8221;<\/strong><\/p>\n<p>\u63d0\u95ee\u8005\u9047\u5230\u4e86\u4e00\u4e2a SQL \u66f4\u65b0\u64cd\u4f5c\u5076\u5c14\u62a5\u9519\u7684\u60c5\u51b5\uff0c\u5177\u4f53\u9519\u8bef\u4fe1\u606f\u4e3a\uff1a&#8221;ERROR: invalid input syntax for integer: &#8220;0.00&#8221;&#8221;.<\/p>\n<p>\u8be2\u95ee\u540e\u5f97\u77e5\uff0c\u6570\u636e\u5e93\u4e2d\u53d7\u5f71\u54cd\u5b57\u6bb5\u7684\u7c7b\u578b\u4e3a numeric\uff0c\u957f\u5ea6\u4e3a 0\uff0c\u5c0f\u6570\u70b9\u4e3a 0\u3002\u4f46\u66f4\u65b0\u64cd\u4f5c\u65f6\u5374\u62a5\u51fa\u6574\u6570\u9519\u8bef\u3002<\/p>\n<p><strong>\u89e3\u7b54\uff1a<\/strong><\/p>\n<p>\u8fd9\u4e2a\u95ee\u9898\u53ef\u80fd\u662f\u7531\u4ee5\u4e0b\u539f\u56e0\u5f15\u8d77\u7684\uff1a<\/p>\n<p>\u5728 Java \u4ee3\u7801\u4e2d\uff0c\u4f20\u9012\u7684\u53c2\u6570\u7c7b\u578b\u4e0d\u6b63\u786e\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u4f60\u4f20\u9012\u4e86\u4e00\u4e2a\u6d6e\u70b9\u5b57\u7b26\u4e32\u53c2\u6570\uff0c\u800c PostgreSQL \u5728\u7c7b\u578b\u8f6c\u6362\u65f6\u65e0\u6cd5\u8bc6\u522b\u5b83\u3002<\/p>\n<p>\u5982\u679c\u4f60\u4e0d\u5e26 &#8220;.00&#8243;\uff0cPostgreSQL \u5c31\u53ef\u4ee5\u8bc6\u522b\u53c2\u6570\u5e76\u6210\u529f\u66f4\u65b0\u3002<\/p>\n<p><strong>\u5efa\u8bae\uff1a<\/strong><\/p>\n<p>\u8c03\u6574 Java \u4ee3\u7801\u4e2d\u53c2\u6570\u7684\u7c7b\u578b\uff0c\u4f7f\u5176\u4e0e\u6570\u636e\u5e93\u4e2d\u53d7\u5f71\u54cd\u5b57\u6bb5\u7684\u7c7b\u578b\u5339\u914d\u3002\u5982\u679c\u4f60\u7684\u5b57\u6bb5\u7c7b\u578b\u662f numeric \u4e14\u6ca1\u6709\u5c0f\u6570\u70b9\uff0c\u8bf7\u4f20\u9012\u4e00\u4e2a\u6574\u6570\u53c2\u6570\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u4e3a\u4ec0\u4e48\u6211\u7684 SQL \u66f4\u65b0\u64cd\u4f5c\u5076\u5c14\u4f1a\u62a5 &#8220;ERROR: invalid input syntax for integer: &#8220;0.00&#8221;&#8221; \u9519\u8bef\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL \u66f4\u65b0\u51fa\u73b0\u95f4\u6b47\u6027\u9519\u8bef\uff1a&#8221;ERROR: invalid input syntax for integer: &#8220;0.00&#8221;\uff1f&#8221; \u63d0\u95ee\u8005\u9047\u5230\u4e86\u4e00\u4e2a SQL \u66f4\u65b0\u64cd\u4f5c\u5076\u5c14\u62a5\u9519\u7684\u60c5\u51b5\uff0c\u5177\u4f53\u9519\u8bef\u4fe1\u606f\u4e3a\uff1a&#8221;ERROR: invalid input syntax for integer: &#8220;0.00&#8221;&#8221;. \u8be2\u95ee\u540e\u5f97\u77e5\uff0c\u6570\u636e\u5e93\u4e2d\u53d7\u5f71\u54cd\u5b57\u6bb5\u7684\u7c7b\u578b\u4e3a numeric\uff0c\u957f\u5ea6\u4e3a 0\uff0c\u5c0f\u6570\u70b9\u4e3a 0\u3002\u4f46\u66f4\u65b0\u64cd\u4f5c\u65f6\u5374\u62a5\u51fa\u6574\u6570\u9519\u8bef\u3002 \u89e3\u7b54\uff1a \u8fd9\u4e2a\u95ee\u9898\u53ef\u80fd\u662f\u7531\u4ee5\u4e0b\u539f\u56e0\u5f15\u8d77\u7684\uff1a \u5728 Java \u4ee3\u7801\u4e2d\uff0c\u4f20\u9012\u7684\u53c2\u6570\u7c7b\u578b\u4e0d\u6b63\u786e\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u4f60\u4f20\u9012\u4e86\u4e00\u4e2a\u6d6e\u70b9\u5b57\u7b26\u4e32\u53c2\u6570\uff0c\u800c PostgreSQL \u5728\u7c7b\u578b\u8f6c\u6362\u65f6\u65e0\u6cd5\u8bc6\u522b\u5b83\u3002 \u5982\u679c\u4f60\u4e0d\u5e26 &#8220;.00&#8243;\uff0cPostgreSQL \u5c31\u53ef\u4ee5\u8bc6\u522b\u53c2\u6570\u5e76\u6210\u529f\u66f4\u65b0\u3002 \u5efa\u8bae\uff1a \u8c03\u6574 Java \u4ee3\u7801\u4e2d\u53c2\u6570\u7684\u7c7b\u578b\uff0c\u4f7f\u5176\u4e0e\u6570\u636e\u5e93\u4e2d\u53d7\u5f71\u54cd\u5b57\u6bb5\u7684\u7c7b\u578b\u5339\u914d\u3002\u5982\u679c\u4f60\u7684\u5b57\u6bb5\u7c7b\u578b\u662f numeric \u4e14\u6ca1\u6709\u5c0f\u6570\u70b9\uff0c\u8bf7\u4f20\u9012\u4e00\u4e2a\u6574\u6570\u53c2\u6570\u3002 \u4ee5\u4e0a\u5c31\u662f\u4e3a\u4ec0\u4e48\u6211\u7684 SQL \u66f4\u65b0\u64cd\u4f5c\u5076\u5c14\u4f1a\u62a5 &#8220;ERROR: invalid input syntax for integer: &#8220;0.00&#8221;&#8221; \u9519\u8bef\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\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-25393","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25393","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=25393"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25393\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=25393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=25393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=25393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}