Integersbit 
Integer data with either a 1 or 0 value. 
int 
Integer (whole number) data from -2^31 (-2,147,483,648) through 2^31 - 1 (2,147,483,647). 
smallint 
Integer data from 2^15 (-32,768) through 2^15 - 1 (32,767). 
tinyint 
Integer data from 0 through 255. 
decimal and numericdecimal 
Fixed precision and scale numeric data from -10^38 -1 through 10^38 -1. 
numeric 
A synonym for decimal. 
money and smallmoneymoney 
Monetary data values from -2^63 (-922,337,203,685,477.5808) through 2^63 - 1 (+922,337,203,685,477.5807), with accuracy to a ten-thousandth of a monetary unit. 
smallmoney 
Monetary data values from -214,748.3648 through +214,748.3647, with accuracy to a ten-thousandth of a monetary unit. 
Approximate Numericsfloat 
Floating precision number data from -1.79E + 308 through 1.79E + 308. 
real 
Floating precision number data from -3.40E + 38 through 3.40E + 38. 
datetime and smalldatetimedatetime 
Date and time data from January 1, 1753, to December 31, 9999, with an accuracy of three-hundredths of a second, or 3.33 milliseconds. 
smalldatetime 
Date and time data from January 1, 1900, through June 6, 2079, with an accuracy of one minute. 
Numericscursor 
A reference to a cursor. 
timestamp 
A database-wide unique number. 
uniqueidentifier 
A globally unique identifier (GUID). 
Character Stringschar 
Fixed-length non-Unicode character data with a maximum length of 8,000 characters. 
varchar 
Variable-length non-Unicode data with a maximum of 8,000 characters. 
text 
Variable-length non-Unicode data with a maximum length of 2^31 - 1 (2,147,483,647) characters. 
Unicode Character Stringsnchar 
Fixed-length Unicode data with a maximum length of 4,000 characters. 
nvarchar 
Variable-length Unicode data with a maximum length of 4,000 characters. sysname is a system-supplied user-defined data type that is a synonym for nvarchar(128) and is used to reference database object names. 
ntext 
Variable-length Unicode data with a maximum length of 2^30 - 1 (1,073,741,823) characters. 
Binary Stringsbinary 
Fixed-length binary data with a maximum length of 8,000 bytes. 
varbinary 
Variable-length binary data with a maximum length of 8,000 bytes. 
image 
Variable-length binary data with a maximum length of 2^31 - 1 (2,147,483,647) bytes. 
参见SQL的Online Books(没装SQL2000中文版,只能让你看这段e文的)

解决方案 »

  1.   

    >>有逻辑类型吗?
    bit: 0/1
      

  2.   

    一般使用BIT的,但是如果有其他控制,也可以考虑使用TINYINT,自己定义0和1或者2的含义,对不熟悉BIT的很有用。
      

  3.   

    能不能用汉语解释一下?nchar,ntext,nvarchar,text,varchar有什么不同?
      

  4.   

    bit为逻辑型
    char 为定长字符
    varchar 为变长字符,不足时用空格补足,最长为255
    text 为文本型,最长为2g
      

  5.   

    给你中文的数据类型
    在 Microsoft® SQL Server™ 中,每个列、局部变量、表达式和参数都有一个相关的数据类型,这是指定对象可持有的数据类型(整型、字符、money 等等)的特性。SQL Server 提供系统数据类型集,定义了可与 SQL Server 一起使用的所有数据类型。下面列出系统提供的数据类型集。可以定义用户定义的数据类型,其是系统提供的数据类型的别名。有关用户定义的数据类型的更多信息,请参见 sp_addtype 和创建用户定义的数据类型。当两个具有不同数据类型、排序规则、精度、小数位数或长度的表达式通过运算符进行组合时: 通过将数据类型的优先顺序规则应用到输入表达式的数据类型来确定所得值的数据类型。有关更多信息,请参见数据类型的优先顺序。
    如果结果数据类型为 char、varchar、text、nchar、nvarchar 或 ntext,则结果值的排序规则由排序规则的优先顺序规则决定。有关更多信息,请参见排序规则的优先顺序。
    结果的精度、小数位数及长度取决于输入表达式的精度、小数位数及长度。有关更多信息,请参见精度、小数位数和长度。 
    SQL Server 为 SQL-92 兼容性提供了数据类型同义词。有关更多信息,请参见数据类型同义词。精确数字
    整数
    bigint从 -2^63 (-9223372036854775808) 到 2^63-1 (9223372036854775807) 的整型数据(所有数字)。int从 -2^31 (-2,147,483,648) 到 2^31 - 1 (2,147,483,647) 的整型数据(所有数字)。smallint从 -2^15 (-32,768) 到 2^15 - 1 (32,767) 的整数数据。tinyint从 0 到 255 的整数数据。bit
    bit1 或 0 的整数数据。decimal 和 numeric
    decimal从 -10^38 +1 到 10^38 –1 的固定精度和小数位的数字数据。numeric功能上等同于 decimal。money 和 smallmoney
    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.40E + 38 到 3.40E + 38 的浮点精度数字。datetime 和 smalldatetime
    datetime从 1753 年 1 月 1 日到 9999 年 12 月 31 日的日期和时间数据,精确到百分之三秒(或 3.33 毫秒)。smalldatetime从 1900 年 1 月 1 日到 2079 年 6 月 6 日的日期和时间数据,精确到分钟。字符串
    char固定长度的非 Unicode 字符数据,最大长度为 8,000 个字符。varchar可变长度的非 Unicode 数据,最长为 8,000 个字符。text可变长度的非 Unicode 数据,最大长度为 2^31 - 1 (2,147,483,647) 个字符。Unicode 字符串
    nchar固定长度的 Unicode 数据,最大长度为 4,000 个字符。 nvarchar可变长度 Unicode 数据,其最大长度为 4,000 字符。sysname 是系统提供用户定义的数据类型,在功能上等同于 nvarchar(128),用于引用数据库对象名。ntext可变长度 Unicode 数据,其最大长度为 2^30 - 1 (1,073,741,823) 个字符。二进制字符串
    binary固定长度的二进制数据,其最大长度为 8,000 个字节。varbinary可变长度的二进制数据,其最大长度为 8,000 个字节。image可变长度的二进制数据,其最大长度为 2^31 - 1 (2,147,483,647) 个字节。其它数据类型
    cursor游标的引用。sql_variant一种存储 SQL Server 支持的各种数据类型(text、ntext、timestamp 和 sql_variant 除外)值的数据类型。table一种特殊的数据类型,存储供以后处理的结果集。timestamp数据库范围的唯一数字,每次更新行时也进行更新。uniqueidentifier全局唯一标识符 (GUID)。