{"id":7187,"date":"2024-11-14T09:36:52","date_gmt":"2024-11-14T01:36:52","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7187\/"},"modified":"2024-11-14T09:36:52","modified_gmt":"2024-11-14T01:36:52","slug":"mysql-update-%e6%93%8d%e4%bd%9c%e6%8a%a5%e9%94%99%ef%bc%9ainvalid-input-syntax-for-integer-%e5%a6%82%e4%bd%95%e8%a7%a3%e5%86%b3%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7187\/","title":{"rendered":"MySQL UPDATE \u64cd\u4f5c\u62a5\u9519\uff1a&#8221;invalid input syntax for integer&#8221; \u5982\u4f55\u89e3\u51b3\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173059976593661.jpg\" class=\"aligncenter\" title=\"MySQL UPDATE \u64cd\u4f5c\u62a5\u9519\uff1a&#8221;invalid input syntax for integer&#8221; \u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" alt=\"MySQL UPDATE \u64cd\u4f5c\u62a5\u9519\uff1a&#8221;invalid input syntax for integer&#8221; \u5982\u4f55\u89e3\u51b3\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>MySQL\u4e2dUPDATE\u64cd\u4f5c\u5076\u5c14\u62a5\u9519\uff1ainvalid input syntax for integer<\/strong><\/p>\n<p>\u5728\u4f7f\u7528MySQL\u6267\u884cUPDATE\u64cd\u4f5c\u65f6\uff0c\u5076\u5c14\u4f1a\u9047\u5230\u62a5\u9519\uff1aERROR: invalid input syntax for integer: &#8220;0.00&#8221;\u3002\u8fd9\u4e00\u95ee\u9898\u901a\u5e38\u53d1\u751f\u5728\u5b57\u6bb5\u6570\u636e\u7c7b\u578b\u4e3anumeric\u4e14\u957f\u5ea6\u548c\u5c0f\u6570\u70b9\u5747\u4e3a0\u7684\u60c5\u51b5\u4e0b\u3002<\/p>\n<p>\u76ee\u524d\uff0c\u6570\u636e\u5e93\u4e2d\u5b58\u5728\u4e00\u4e2a\u540d\u4e3a\u201cnumeric\u201d\u7684\u5b57\u6bb5\uff0c\u5176\u7c7b\u578b\u4e3anumeric\uff0c\u957f\u5ea6\u4e3a0\u3001\u5c0f\u6570\u70b9\u4e3a0\u3002\u5728\u6267\u884cUPDATE\u64cd\u4f5c\u65f6\uff0c\u6709\u65f6\u4f1a\u62a5\u51fa\u4e0a\u8ff0\u9519\u8bef\u3002<\/p>\n<p>\u7ecf\u8c03\u67e5\uff0c\u53d1\u73b0\u95ee\u9898\u7684\u539f\u56e0\u5728\u4e8e\u4f20\u9012\u7ed9UPDATE\u64cd\u4f5c\u7684\u53c2\u6570\u662f\u6d6e\u70b9\u5b57\u7b26\u4e32\u3002PostgreSQL\u5728\u8f6c\u6362\u7c7b\u578b\u65f6\u65e0\u6cd5\u8bc6\u522b\u8be5\u5b57\u7b26\u4e32\u3002\u5982\u679c\u53c2\u6570\u4e2d\u4e0d\u5305\u542b&#8221;.00&#8243;\uff0c\u5219\u53ef\u4ee5\u6b63\u786e\u8bc6\u522b\u3002<\/p>\n<p>\u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u4f60\u9700\u8981\u5728Java\u4ee3\u7801\u4e2d\u8c03\u6574\u53c2\u6570\u7c7b\u578b\u3002\u5efa\u8bae\u5c06\u6d6e\u70b9\u5b57\u7b26\u4e32\u53c2\u6570\u8f6c\u6362\u4e3a\u4e0d\u5e26&#8221;.00&#8243;\u7684\u6574\u6570\u5b57\u7b26\u4e32\u3002\u8fd9\u6837\uff0cPostgreSQL\u5c31\u53ef\u4ee5\u6b63\u786e\u8f6c\u6362\u7c7b\u578b\uff0c\u907f\u514d\u62a5\u9519\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fMySQL UPDATE \u64cd\u4f5c\u62a5\u9519\uff1a&#8221;invalid input syntax for integer&#8221; \u5982\u4f55\u89e3\u51b3\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\u4e2dUPDATE\u64cd\u4f5c\u5076\u5c14\u62a5\u9519\uff1ainvalid input syntax for integer \u5728\u4f7f\u7528MySQL\u6267\u884cUPDATE\u64cd\u4f5c\u65f6\uff0c\u5076\u5c14\u4f1a\u9047\u5230\u62a5\u9519\uff1aERROR: invalid input syntax for integer: &#8220;0.00&#8221;\u3002\u8fd9\u4e00\u95ee\u9898\u901a\u5e38\u53d1\u751f\u5728\u5b57\u6bb5\u6570\u636e\u7c7b\u578b\u4e3anumeric\u4e14\u957f\u5ea6\u548c\u5c0f\u6570\u70b9\u5747\u4e3a0\u7684\u60c5\u51b5\u4e0b\u3002 \u76ee\u524d\uff0c\u6570\u636e\u5e93\u4e2d\u5b58\u5728\u4e00\u4e2a\u540d\u4e3a\u201cnumeric\u201d\u7684\u5b57\u6bb5\uff0c\u5176\u7c7b\u578b\u4e3anumeric\uff0c\u957f\u5ea6\u4e3a0\u3001\u5c0f\u6570\u70b9\u4e3a0\u3002\u5728\u6267\u884cUPDATE\u64cd\u4f5c\u65f6\uff0c\u6709\u65f6\u4f1a\u62a5\u51fa\u4e0a\u8ff0\u9519\u8bef\u3002 \u7ecf\u8c03\u67e5\uff0c\u53d1\u73b0\u95ee\u9898\u7684\u539f\u56e0\u5728\u4e8e\u4f20\u9012\u7ed9UPDATE\u64cd\u4f5c\u7684\u53c2\u6570\u662f\u6d6e\u70b9\u5b57\u7b26\u4e32\u3002PostgreSQL\u5728\u8f6c\u6362\u7c7b\u578b\u65f6\u65e0\u6cd5\u8bc6\u522b\u8be5\u5b57\u7b26\u4e32\u3002\u5982\u679c\u53c2\u6570\u4e2d\u4e0d\u5305\u542b&#8221;.00&#8243;\uff0c\u5219\u53ef\u4ee5\u6b63\u786e\u8bc6\u522b\u3002 \u8981\u89e3\u51b3\u6b64\u95ee\u9898\uff0c\u4f60\u9700\u8981\u5728Java\u4ee3\u7801\u4e2d\u8c03\u6574\u53c2\u6570\u7c7b\u578b\u3002\u5efa\u8bae\u5c06\u6d6e\u70b9\u5b57\u7b26\u4e32\u53c2\u6570\u8f6c\u6362\u4e3a\u4e0d\u5e26&#8221;.00&#8243;\u7684\u6574\u6570\u5b57\u7b26\u4e32\u3002\u8fd9\u6837\uff0cPostgreSQL\u5c31\u53ef\u4ee5\u6b63\u786e\u8f6c\u6362\u7c7b\u578b\uff0c\u907f\u514d\u62a5\u9519\u3002 \u4ee5\u4e0a\u5c31\u662fMySQL UPDATE \u64cd\u4f5c\u62a5\u9519\uff1a&#8221;invalid input syntax for integer&#8221; \u5982\u4f55\u89e3\u51b3\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-7187","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7187","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=7187"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7187\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}