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

sql server 4 字節無符號整數

sql server 4 byte unsigned int(sql server 4 字節無符號整數)
本文介紹了sql server 4 字節無符號整數的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

有誰知道我可以通過使用 4 個字節而不是使用 8 個字節和 bigint 來保存無符號整數(0 到 4294967295)的任何解決方法嗎?

Does anyone know of any work around by which i can save unsigned integers (0 to 4294967295) simply using 4 bytes instead of using 8 bytes and bigint?

我知道我們可以創建用戶定義的數據類型并對它們創建一個約束以不允許負值,但這仍然不允許我輸入超過 2147483647 的值.我只想使用 4 個字節,但能夠保存更大的整數值大于 2147483647 但小于 4294967295.

I know we can create user defined datatypes and create a constraint on them to not allow negative values but that still does not allow me to enter values over 2147483647. I only want to use 4 bytes but be able to save integer values greater than 2147483647 but less than 4294967295.

可能的重復:SQL Server 中的 4 字節無符號整數?

推薦答案

沒有可用的無符號類型,因此您可以使用 UDT 創建一個,或者選擇更大的數據類型.如果您在 UDT 中執行此操作,您將再次超過 4 個字節.

There is no unsigned type available to you, so you could create one using the UDT, or opt for the larger data type. If you do it in a UDT you are going to exceed the 4 bytes again.

最極端的做法是在您讀取存儲值后通過添加 -2^31 自動將偏移量應用于它,但這是一種真正的 hacky 方法,并且會使查看代碼等的任何人感到困惑,而不是提及錯誤/遺漏的可能性.我根本不推薦 hack.

The extreme hack would be to apply an offset automatically to your stored value after you read it, by adding -2^31 but this is a real hacky way to go about it and confusing for anyone viewing the code etc, not to mention the potential for mistakes / things being missed. I wouldn't recommend the hack at all.

這篇關于sql server 4 字節無符號整數的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

Converting Every Child Tags in to a Single Column with multiple Delimiters -SQL Server (3)(將每個子標記轉換為具有多個分隔符的單列-SQL Server (3))
How can I create a view from more than one table?(如何從多個表創建視圖?)
Create calculated value based on calculated value inside previous row(根據前一行內的計算值創建計算值)
How do I stack the first two columns of a table into a single column, but also pair third column with the first column only?(如何將表格的前兩列堆疊成一列,但也僅將第三列與第一列配對?) - IT屋-程序員軟件開發技
Recursive t-sql query(遞歸 t-sql 查詢)
Convert Month Name to Date / Month Number (Combinations of Questions amp; Answers)(將月份名稱轉換為日期/月份編號(問題和答案的組合))
主站蜘蛛池模板: 国产免费一区 | 伦理午夜电影免费观看 | 自拍偷拍中文字幕 | 欧美日韩不卡在线 | 在线播放国产一区二区三区 | 国产精品日日做人人爱 | 在线播放一区二区三区 | 精品乱码一区二区 | 91麻豆精品国产91久久久久久 | 无码日韩精品一区二区免费 | 成人福利 | av久久 | 97视频成人| 国产91网站在线观看 | 高清av一区 | 国产欧美日韩久久久 | 狠狠做六月爱婷婷综合aⅴ 国产精品视频网 | 欧美日韩第一页 | 国产精品久久久久久238 | 日韩成人免费视频 | 国产成人在线一区二区 | 色秀网站 | 99re在线 | 手机av在线| 亚洲免费一区二区 | 在线欧美一区二区 | 成人性视频免费网站 | 天天射色综合 | 国产免费xxx | 视频1区| 四虎最新视频 | 一区二区三区久久 | 天天干天天干 | 视频一区二区在线观看 | 在线观看亚洲一区二区 | 最新日韩在线 | 在线91| www日韩欧美| 中文字幕一区二区三区四区五区 | 超碰97在线免费 | 2019天天干天天操 |