Microsoft SQL Server 2005 数据类型
序号 类别 SQL C# 备注 1 整数 bit Boolean True转换为1,False转换为0 2 tinyint Byte C#数据类型都位于System命名空间 3 smallint Int16 4 int Int32 5 bigint Int64 6 smallmoney decimal 7 money decimal 8 numeric decimal 9 decimal decimal 10 浮点数 float double 11 real single 12 日期和时间 smalldatetime datetime 13 datetime datetime 14 timestamp datetime 15 字符串 char string 16 text string 17 varchar string 18 nchar string 19 ntext string 20 nvarchar string 21 二进制数据 binary Byte[] 22 varbinary Byte[] 23 image Byte[] 24 其他 uniqueidentifier guid 25 variant object SQL Server 2005的数据类型与SQL 2000有一些不同,在创建表时,列的数据类型需要注意几点 用varchar(max)代替text