久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

轉(zhuǎn)換“十進(jìn)制或數(shù)字"時(shí)精度丟失/溢出的原因

the reason behind loss of precision/overflow when converting quot;decimal or numericquot; data type(轉(zhuǎn)換“十進(jìn)制或數(shù)字時(shí)精度丟失/溢出的原因;數(shù)據(jù)類型)
本文介紹了轉(zhuǎn)換“十進(jìn)制或數(shù)字"時(shí)精度丟失/溢出的原因;數(shù)據(jù)類型的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問題描述

我目前正在 MSDN 并遇到過以下短語(yǔ).

I'm currently learning "numeric" data type on MSDN and have encountered the following phrase.

從十進(jìn)制或數(shù)字轉(zhuǎn)換為浮點(diǎn)數(shù)或?qū)崝?shù)會(huì)導(dǎo)致一些精度損失.從 int、smallint、tinyint、float 轉(zhuǎn)換,real、money 或 smallmoney 轉(zhuǎn)換為十進(jìn)制或數(shù)字可能會(huì)導(dǎo)致溢出.

Converting from decimal or numeric to float or real can cause some loss of precision. Converting from int, smallint, tinyint, float, real, money, or smallmoney to either decimal or numeric can cause overflow.

我真的不明白轉(zhuǎn)換十進(jìn)制或數(shù)字"數(shù)據(jù)類型時(shí)精度損失/溢出背后的原因.有人可以給我解釋一下嗎?

I dont really understand the reason behind loss of precision/overflow when converting "decimal or numeric" data type. Could someone please explain it to me?

推薦答案

Decimal 或 Numeric 數(shù)據(jù)類型實(shí)際上是帶有小數(shù)分隔符位置的整數(shù).關(guān)于聲明的精度,它們可以存儲(chǔ)最小值和最大值之間的每個(gè)值.正如 Ryan 所說(shuō),您可以在從 -32k 到 32k 的四個(gè)字節(jié)內(nèi)存儲(chǔ)大約 64k 個(gè)不同的值.如果你創(chuàng)建一個(gè)四字節(jié)的浮點(diǎn)類型,范圍會(huì)更廣,但仍然有 64k 不同的值要存儲(chǔ).范圍內(nèi)的某些值無(wú)法精確存儲(chǔ).

Decimal or Numeric data types are in fact integer with decimal separator position. They can store each value between min and max values, regarding declared precision. As Ryan said, you can store approx 64k different values within four bytes ranging from -32k to 32k. If you make a four bytes float type, the range would be much wider, but there are still 64k different values to be stored. Some of the values within the range are impossible to be stored precisely.

這篇關(guān)于轉(zhuǎn)換“十進(jìn)制或數(shù)字"時(shí)精度丟失/溢出的原因;數(shù)據(jù)類型的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Modify Existing decimal places info(修改現(xiàn)有小數(shù)位信息)
The correlation name #39;CONVERT#39; is specified multiple times(多次指定相關(guān)名稱“CONVERT)
T-SQL left join not returning null columns(T-SQL 左連接不返回空列)
remove duplicates from comma or pipeline operator string(從逗號(hào)或管道運(yùn)算符字符串中刪除重復(fù)項(xiàng))
Change an iterative query to a relational set-based query(將迭代查詢更改為基于關(guān)系集的查詢)
concatenate a zero onto sql server select value shows 4 digits still and not 5(將零連接到 sql server 選擇值仍然顯示 4 位而不是 5)
主站蜘蛛池模板: 国产成人免费一区二区60岁 | 国产69精品久久99不卡免费版 | 国产色片在线 | 久久九九免费 | 精品麻豆剧传媒av国产九九九 | 人人草天天草 | 日韩电影中文字幕在线观看 | 在线视频 亚洲 | 四虎首页 | 国产成人99久久亚洲综合精品 | 亚洲一区二区三区在线视频 | 国产精品免费一区二区三区四区 | 91人人澡人人爽 | av手机在线看 | 看av电影| 久草在线高清 | 国产一区中文字幕 | 精品亚洲一区二区三区 | 国产a区| 久久久久久久久蜜桃 | 91成人在线视频 | 最新中文字幕在线播放 | 欧洲毛片 | 久久久久免费 | 亚洲第一视频网站 | 国产日韩精品在线 | 性做久久久久久免费观看欧美 | 亚洲天堂999| 久久99精品久久久久久噜噜 | 国产一区二区三区 | 亚洲欧美中文字幕在线观看 | 亚洲婷婷六月天 | 欧美乱操| 国产一区免费视频 | 亚洲视频一区在线观看 | 中文字幕在线观看精品 | 日韩一区二区在线观看 | 国产99精品| 日韩成人在线观看 | 一区二区蜜桃 | 欧美精选一区二区 |