{"id":5021,"date":"2024-11-14T09:10:17","date_gmt":"2024-11-14T01:10:17","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5021\/"},"modified":"2024-11-14T09:10:17","modified_gmt":"2024-11-14T01:10:17","slug":"oracle%e6%97%a0%e6%95%88%e6%95%b0%e5%ad%97%e6%80%8e%e4%b9%88%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5021\/","title":{"rendered":"oracle\u65e0\u6548\u6570\u5b57\u600e\u4e48\u89e3\u51b3"},"content":{"rendered":"<p><strong>\u5982\u4f55\u89e3\u51b3  \u65e0\u6548\u6570\u5b57\u9519\u8bef<\/strong><\/p>\n<p>Oracle \u4e2d\u7684\u65e0\u6548\u6570\u5b57\u9519\u8bef\u4f1a\u5728\u5c1d\u8bd5\u5b58\u50a8\u8d85\u51fa\u6709\u6548\u8303\u56f4\u7684\u6570\u5b57\u503c\u65f6\u53d1\u751f\u3002\u89e3\u51b3\u6b64\u9519\u8bef\u6d89\u53ca\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<p><strong>1. \u786e\u5b9a\u6570\u5b57\u8303\u56f4<\/strong><\/p>\n<p>\u6bcf\u4e2a Oracle \u6570\u636e\u7c7b\u578b\u90fd\u6709\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\u5b57\u8303\u56f4\u3002\u5bf9\u4e8e\u6574\u6570\u7c7b\u578b\uff0c\u8303\u56f4\u662f -2^63 \u5230 2^63-1\u3002\u5bf9\u4e8e\u6d6e\u70b9\u6570\u7c7b\u578b\uff0c\u8303\u56f4\u4e3a 1.7976931348623157e+308 \u5230 2.2250738585072014e-308\u3002<\/p>\n<p><strong>2. \u9a8c\u8bc1\u6570\u636e\u503c<\/strong><\/p>\n<p>\u786e\u4fdd\u5c1d\u8bd5\u5b58\u50a8\u7684\u503c\u5728\u6570\u636e\u7c7b\u578b\u7684\u6709\u6548\u8303\u56f4\u5185\u3002\u5982\u679c\u503c\u8d85\u51fa\u8303\u56f4\uff0c\u5219\u9700\u8981\u4fee\u6539\u6570\u636e\u6216\u66f4\u6539\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<p><strong>3. \u68c0\u67e5\u6574\u6570\u503c<\/strong><\/p>\n<p>\u5bf9\u4e8e\u6574\u6570\u503c\uff0c\u9a8c\u8bc1\u503c\u662f\u5426\u4e3a\u6574\u6570\u3002Oracle \u4e0d\u652f\u6301\u5b58\u50a8\u5e26\u6709\u5c0f\u6570\u70b9\u7684\u6574\u6570\u503c\u3002<\/p>\n<p><strong>4. \u68c0\u67e5\u6d6e\u70b9\u6570<\/strong><\/p>\n<p>\u5bf9\u4e8e\u6d6e\u70b9\u6570\uff0c\u9a8c\u8bc1\u503c\u662f\u5426\u6709\u6548\u3002\u65e0\u6548\u7684\u503c\u53ef\u80fd\u5305\u62ec Infinity\u3001NaN\uff08\u975e\u6570\u5b57\uff09\u548c\u6ea2\u51fa\u503c\u3002<\/p>\n<p><strong>5. \u4fee\u6539\u6570\u636e<\/strong><\/p>\n<p>\u5982\u679c\u503c\u8d85\u51fa\u8303\u56f4\uff0c\u8bf7\u4fee\u6539\u6570\u636e\u4ee5\u4f7f\u5176\u7b26\u5408\u6709\u6548\u8303\u56f4\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u6574\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528 ROUND \u51fd\u6570\u5c06\u503c\u56db\u820d\u4e94\u5165\u5230\u6700\u63a5\u8fd1\u7684\u6709\u6548\u6574\u6570\u3002\u5bf9\u4e8e\u6d6e\u70b9\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528 TRUNC \u51fd\u6570\u5c06\u5c0f\u6570\u90e8\u5206\u622a\u65ad\u3002<\/p>\n<p><strong>6. \u66f4\u6539\u6570\u636e\u7c7b\u578b<\/strong><\/p>\n<p>\u5982\u679c\u4fee\u6539\u6570\u636e\u4e0d\u5408\u9002\uff0c\u5219\u9700\u8981\u66f4\u6539\u6570\u636e\u7c7b\u578b\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u8d85\u51fa INTEGER \u8303\u56f4\u7684\u6574\u6570\uff0c\u53ef\u4ee5\u66f4\u6539\u6570\u636e\u7c7b\u578b\u4e3a NUMBER(19)\u3002\u5bf9\u4e8e\u8d85\u51fa FLOAT \u8303\u56f4\u7684\u6d6e\u70b9\u6570\uff0c\u53ef\u4ee5\u66f4\u6539\u6570\u636e\u7c7b\u578b\u4e3a BINARY_DOUBLE\u3002<\/p>\n<p>\u901a\u8fc7\u6309\u7167\u8fd9\u4e9b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff0c\u60a8\u53ef\u4ee5\u89e3\u51b3 Oracle \u65e0\u6548\u6570\u5b57\u9519\u8bef\u5e76\u786e\u4fdd\u6570\u636e\u7c7b\u578b\u7684\u5b8c\u6574\u6027\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u65e0\u6548\u6570\u5b57\u600e\u4e48\u89e3\u51b3\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>\u5982\u4f55\u89e3\u51b3 \u65e0\u6548\u6570\u5b57\u9519\u8bef Oracle \u4e2d\u7684\u65e0\u6548\u6570\u5b57\u9519\u8bef\u4f1a\u5728\u5c1d\u8bd5\u5b58\u50a8\u8d85\u51fa\u6709\u6548\u8303\u56f4\u7684\u6570\u5b57\u503c\u65f6\u53d1\u751f\u3002\u89e3\u51b3\u6b64\u9519\u8bef\u6d89\u53ca\u4ee5\u4e0b\u6b65\u9aa4\uff1a 1. \u786e\u5b9a\u6570\u5b57\u8303\u56f4 \u6bcf\u4e2a Oracle \u6570\u636e\u7c7b\u578b\u90fd\u6709\u4e00\u4e2a\u7279\u5b9a\u7684\u6570\u5b57\u8303\u56f4\u3002\u5bf9\u4e8e\u6574\u6570\u7c7b\u578b\uff0c\u8303\u56f4\u662f -2^63 \u5230 2^63-1\u3002\u5bf9\u4e8e\u6d6e\u70b9\u6570\u7c7b\u578b\uff0c\u8303\u56f4\u4e3a 1.7976931348623157e+308 \u5230 2.2250738585072014e-308\u3002 2. \u9a8c\u8bc1\u6570\u636e\u503c \u786e\u4fdd\u5c1d\u8bd5\u5b58\u50a8\u7684\u503c\u5728\u6570\u636e\u7c7b\u578b\u7684\u6709\u6548\u8303\u56f4\u5185\u3002\u5982\u679c\u503c\u8d85\u51fa\u8303\u56f4\uff0c\u5219\u9700\u8981\u4fee\u6539\u6570\u636e\u6216\u66f4\u6539\u6570\u636e\u7c7b\u578b\u3002 3. \u68c0\u67e5\u6574\u6570\u503c \u5bf9\u4e8e\u6574\u6570\u503c\uff0c\u9a8c\u8bc1\u503c\u662f\u5426\u4e3a\u6574\u6570\u3002Oracle \u4e0d\u652f\u6301\u5b58\u50a8\u5e26\u6709\u5c0f\u6570\u70b9\u7684\u6574\u6570\u503c\u3002 4. \u68c0\u67e5\u6d6e\u70b9\u6570 \u5bf9\u4e8e\u6d6e\u70b9\u6570\uff0c\u9a8c\u8bc1\u503c\u662f\u5426\u6709\u6548\u3002\u65e0\u6548\u7684\u503c\u53ef\u80fd\u5305\u62ec Infinity\u3001NaN\uff08\u975e\u6570\u5b57\uff09\u548c\u6ea2\u51fa\u503c\u3002 5. \u4fee\u6539\u6570\u636e \u5982\u679c\u503c\u8d85\u51fa\u8303\u56f4\uff0c\u8bf7\u4fee\u6539\u6570\u636e\u4ee5\u4f7f\u5176\u7b26\u5408\u6709\u6548\u8303\u56f4\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u6574\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528 ROUND \u51fd\u6570\u5c06\u503c\u56db\u820d\u4e94\u5165\u5230\u6700\u63a5\u8fd1\u7684\u6709\u6548\u6574\u6570\u3002\u5bf9\u4e8e\u6d6e\u70b9\u6570\uff0c\u53ef\u4ee5\u4f7f\u7528 TRUNC \u51fd\u6570\u5c06\u5c0f\u6570\u90e8\u5206\u622a\u65ad\u3002 6. \u66f4\u6539\u6570\u636e\u7c7b\u578b \u5982\u679c\u4fee\u6539\u6570\u636e\u4e0d\u5408\u9002\uff0c\u5219\u9700\u8981\u66f4\u6539\u6570\u636e\u7c7b\u578b\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u8d85\u51fa INTEGER \u8303\u56f4\u7684\u6574\u6570\uff0c\u53ef\u4ee5\u66f4\u6539\u6570\u636e\u7c7b\u578b\u4e3a NUMBER(19)\u3002\u5bf9\u4e8e\u8d85\u51fa FLOAT \u8303\u56f4\u7684\u6d6e\u70b9\u6570\uff0c\u53ef\u4ee5\u66f4\u6539\u6570\u636e\u7c7b\u578b\u4e3a BINARY_DOUBLE\u3002 \u901a\u8fc7\u6309\u7167\u8fd9\u4e9b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff0c\u60a8\u53ef\u4ee5\u89e3\u51b3 Oracle \u65e0\u6548\u6570\u5b57\u9519\u8bef\u5e76\u786e\u4fdd\u6570\u636e\u7c7b\u578b\u7684\u5b8c\u6574\u6027\u3002 \u4ee5\u4e0a\u5c31\u662f\u65e0\u6548\u6570\u5b57\u600e\u4e48\u89e3\u51b3\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-5021","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5021","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=5021"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5021\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}