WhatsnewinMicrosoft2000(一)

来源:互联网 发布:油画在线网络课程 编辑:程序博客网 时间:2024/05/18 00:37
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
新的数据类型
继SQL7增加了四种新的数据类型之后,SQL2000又提供了两种新的数据类型,分别是bigint和sql_variant。
在数据量越来越大的今天,用int(-2^31(-2,147,483,648)到2^31-1(2,147,483,647))来表示整数有时已经显得不太够
用了,FLOAT也不是很合适,所以VB7和SQL2000都有了新的整数类型,这就是bigint,它是8bytes的整数类型,范围是-2^63
(-9223372036854775808)到2^63-1(9223372036854775807)。

熟悉VBScript的人都知道,VBS使用的是一种叫做variant的数据类型。它可以存放任何数据类型,数字、字符、对象等。SQL
2000里面的sql_variant还没有那么强大的功能,它不能存放blob的数据,如text、ntext和image,还有timestamp,但是已经给
带来了很大的方便了。

要注意的是,以前版本的ADO对这两种数据类型的支持都不完全,要在程序中使用这两种数据,请使用MDAC2.6

下期预告:
用户自定义函数

附录:
SQL7.0的新数据类型

1.Uniqueidentifier
SQL7里新增的一个数据类型,是对记录的全球唯一标志(GUID),就象我们常见到的CLSID那样
00020803-0000-0000-C000-000000000046
D54EEE56-AAAB-11D0-9E1D-00A0C922E6EC
有一个函数可以产生新的GUID:NewID()
2.Char&amp;VarChar&amp;Binary&amp;VarBinary
最大长度发生了很大的改变,以前这两种数据类型的最大长度是255,而现在是8000,看来是Microsoft向学习的结果
3.NChar&amp;NVarChar&amp;NText
新增的数据类型,94Unicode的字符类型(出处:)

[1]


<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>