|
比较笨的我又不知怎样去找帮助系统,身边又没有书什么的,所以就。。。。。希望大家给我提示: 我现将他们全列出。 binary [ ] bit [ ] char (是不是字符型) datetime (这个我知道,日期时间嘛!呵呵。。) decimal [ ] float [ ] image [ ] int [ ] money [ ] nchar [ ] ntext [ ] numeric[ ] nvarchar[ ] real [ ] smalldatetime[ ] smallint [ ] smallmoney[ ] text[ ] timestamp[ ] tinyint[ ] uniqueidentifier[ ] varchar[ ] 我对那些类型的SMALL的非常不明白,。。。。如:SMALLDATETIME与DATETIME有啥区别呢? |
|
|
|
值域不同,例如MS SQL Server;
smallint 16bit -32768..32767 int 32bit -2,147,483,648..2,147,483,647 more...: datetime 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. more and more: find in MSDN, to type words "data types, smalldatetime" in INDEX pane, and have a look, OK? |
|
|
binary [ 这个我也不太用 ]
bit [ 位域:用于数据只需要几个状态的情况,可以大大节省空间 ] char (是不是字符型?YES) datetime (这个我知道,日期时间嘛!呵呵。。) decimal [ ] float [ 浮点类型:用于高精度计算 ] image [ 这个大约是图片类型? ] int [ 整数类型 ] money [ 专门用于保存货币数字,其实也可以用别的,但是用这个比较直观方便] nchar [ 这个大概是定长的字符串 ] ntext [ 这个类似MEMO字段类型 ] numeric[ 数字类型,用的比较广泛 ] nvarchar[ ] real [ 数字类型,用于数学计算 ] smalldatetime[小的日期时间类型,在里头只能存储某某时期,或者某某时间] smallint [ 小整数,我是很少用它,谁在乎浪费点存储空间? ] smallmoney[ 这个吗,不说了 ] text[ 文本,和NTEXT的区别,我也不了解 ] timestamp[时间戳,如果你想得到一个永远不一样的数据,用这个] tinyint[ 微整数,我从来不用 ] uniqueidentifier[ 唯一的数据描述符,大概也是用来标志数据用的吧 ] varchar[ 这个数据类型和CHAR作用相同,区别是如果你的数据长短不一,用它可以节省存储空间,CHAR是不管有没有数据都分配存储空间的。在处理VARCHAR上会有轻微的性能损失,但是当然没有关系啦,考虑到很多数据表其实都不能添满,我几乎在所有要用CHAR的地方都用VARCHAR代替的。] |
|
|
binary [二进制数据]
bit [字节型数据,1位] char [定长字符型) datetime [日期时间,范围较大,1753-1-1,9999-12-31。] decimal [数值,定精度和数值范围] float [浮点数,相当于双精度型] image [图像类型,可存储2GB的数据] int [整数类型] money [货币类型,范围较大,-2^63 (-922,337,203,685,477.5808) ---- 2^63 - 1 (+922,337,203,685,477.5807), 占8位] nchar [定长字符类型,支持Unicode] ntext [备注,可存储2GB的数据,支持unicode] numeric[整数,定精度和数值范围] nvarchar[变长类型数据,支持unicode] real [浮点数,单精度] smalldatetime[日期,范围较小1900-1-1---2079-6-6] smallint [整数,精度较小] smallmoney[货币,范围较小- 214,748.3648 ----- +214,748.3647,占4位] text[备注,可存储2GB的数据] timestamp[时间戳,每一个表只有一个字段能使用这种类型] tinyint[整数,0-255] uniqueidentifier[唯一数据描述符] varchar[变长字符类型] |
|
|
binary [二进制数据]
bit [字节型数据,1位] char [定长字符型) datetime [日期时间,精度在毫微秒。] decimal [数值,定精度和数值范围] float [浮点数,相当于双精度型] image [图像类型,可存储2GB的数据] int [整数类型] money [货币类型,范围较大,-2^63 (-922,337,203,685,477.5808) ---- 2^63 - 1 (+922,337,203,685,477.5807), 占8位] nchar [定长字符类型,支持Unicode] ntext [备注,可存储2GB的数据(理论上),支持unicode] numeric[整数,定精度和数值范围] nvarchar[变长类型数据,支持unicode] real [浮点数,单精度] smalldatetime[日期,范围较小,精度在秒] smallint [整数,精度较小] smallmoney[货币,范围较小- 214,748.3648 ----- +214,748.3647,占4位] text[备注,可存储2GB的数据] timestamp[时间戳,每一个表只有一个字段能使用这种类型] tinyint[整数,0-255] uniqueidentifier[唯一数据描述符] varchar[变长字符类型] |
|