sql資料庫欄位類型

來源:互聯網
上載者:User
欄位類型 描述
bit 0或1的整型數字(我怎麼只能輸入True or False啊)
int 從-2^31(-2,147,483,648)到2^31(2,147,483,647)的整型數字
smallint 從-2^15(-32,768)到2^15(32,767)的整型數字
tinyint 從0到255的整型數字
 
decimal 從-10^38到10^38-1的定精度與有效位元的數字
numeric decimal的同義字
 
money 從-2^63(-922,337,203,685,477.5808)到2^63-1(922,337,203,685,477.5807)的貨幣資料,最小貨幣單位千分之十
smallmoney 從-214,748.3648到214,748.3647的貨幣資料,最小貨幣單位千分之十
 
float 從-1.79E+308到1.79E+308可變精度的數字
real 從-3.04E+38到3.04E+38可變精度的數字
 
datetime 從1753年1月1日到9999年12日31的日期和時間資料,最小時間單位為百分之三秒或3.33毫秒
smalldatetime 從1900年1月1日到2079年6月6日的日期和時間資料,最小時間單位為分鐘
 
timestamp 時間戳記,一個資料庫寬度的唯一數字
uniqueidentifier 全球唯一識別碼GUID
 
char 定長非Unicode的字元型資料,最大長度為8000
varchar 變長非Unicode的字元型資料,最大長度為8000
text 變長非Unicode的字元型資料,最大長度為2^31-1(2G)
 
nchar 定長Unicode的字元型資料,最大長度為8000
nvarchar 變長Unicode的字元型資料,最大長度為8000
ntext 變長Unicode的字元型資料,最大長度為2^31-1(2G)
 
binary 定長位元據,最大長度為8000
varbinary 變長位元據,最大長度為8000
image 變長位元據,最大長度為2^31-1(2G)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.