字段類型 | 描述 |
bit | 0或1的整型數(shù)字 |
int | 從-2^31(-2,147,483,648)到2^31(2,147,483,647)的整型數(shù)字 |
smallint | 從-2^15(-32,768)到2^15(32,767)的整型數(shù)字 |
tinyint | 從0到255的整型數(shù)字 |
decimal | 從-10^38到10^38-1的定精度與有效位數(shù)的數(shù)字 |
numeric | decimal的同義詞 |
money | 從-2^63(-922,337,203,685,477.5808)到2^63-1(922,337,203,685,477.5807)的貨幣數(shù)據(jù),最小貨幣單位千分之十 |
smallmoney | 從-214,748.3648到214,748.3647的貨幣數(shù)據(jù),最小貨幣單位千分之十 |
float | 從-1.79E+308到1.79E+308可變精度的數(shù)字 |
real | 從-3.04E+38到3.04E+38可變精度的數(shù)字 |
datetime | 從1753年1月1日到9999年12日31的日期和時間數(shù)據(jù),最小時間單位為百分之三秒或3.33毫秒 |
smalldatetime | 從1900年1月1日到2079年6月6日的日期和時間數(shù)據(jù),最小時間單位為分鐘 |
timestamp | 時間戳,一個數(shù)據(jù)庫寬度的唯一數(shù)字 |
uniqueidentifier | 全球唯一標識符GUID |
char | 定長非Unicode的字符型數(shù)據(jù),最大長度為8000 |
varchar | 變長非Unicode的字符型數(shù)據(jù),最大長度為8000 |
text | 變長非Unicode的字符型數(shù)據(jù),最大長度為2^31-1(2G) |
nchar | 定長Unicode的字符型數(shù)據(jù),最大長度為8000 |
nvarchar | 變長Unicode的字符型數(shù)據(jù),最大長度為8000 |
ntext | 變長Unicode的字符型數(shù)據(jù),最大長度為2^31-1(2G) |
binary | 定長二進制數(shù)據(jù),最大長度為8000 |
varbinary | 變長二進制數(shù)據(jù),最大長度為8000 |
image | 變長二進制數(shù)據(jù),最大長度為2^31-1(2G) |
上一篇:SQL語句示例