﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-满了易醉...-随笔分类-数据库笔记</title><link>http://www.blogjava.net/cenly60/category/28371.html</link><description>好好做人，好好做事... ... </description><language>zh-cn</language><lastBuildDate>Tue, 25 Dec 2007 15:46:56 GMT</lastBuildDate><pubDate>Tue, 25 Dec 2007 15:46:56 GMT</pubDate><ttl>60</ttl><item><title>SQL Server支持的数据类型</title><link>http://www.blogjava.net/cenly60/archive/2007/12/25/170414.html</link><dc:creator>cEnLy.60</dc:creator><author>cEnLy.60</author><pubDate>Tue, 25 Dec 2007 14:54:00 GMT</pubDate><guid>http://www.blogjava.net/cenly60/archive/2007/12/25/170414.html</guid><wfw:comment>http://www.blogjava.net/cenly60/comments/170414.html</wfw:comment><comments>http://www.blogjava.net/cenly60/archive/2007/12/25/170414.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/cenly60/comments/commentRss/170414.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/cenly60/services/trackbacks/170414.html</trackback:ping><description><![CDATA[<div class="Content-body">
<div class="date"></div>
<table style="table-layout: fixed">
    <tbody>
        <tr>
            <td>
            <div class="cnt">
            <p>
            <table cellspacing="0" cellpadding="5" width="90%" border="1">
                <tbody>
                    <tr>
                        <th align="left" width="26%"><font class="90v">数据类型<br />
                        </font></th>
                        <th align="left" width="74%"><font class="90v">说明<br />
                        </font></th>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">BIGINT</font></td>
                        <td valign="top" width="74%"><font class="90v">从 -2^63 (-9223372036854775808) 到 2^63-1 (9223372036854775807) 的整型数据（整数）。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">INT</font></td>
                        <td valign="top" width="74%"><font class="90v">从 -2^31 (-2,147,483,648) 到 2^31-1 (2,147,483,647) 的整型数据（整数）。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">SMALLINT</font></td>
                        <td valign="top" width="74%"><font class="90v">从 2^15 (-32,768) 到 2^15 - 1 (32,767) 的整型数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">TINYINT</font></td>
                        <td valign="top" width="74%"><font class="90v">从 0 到 255 的整型数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">BIT</font></td>
                        <td valign="top" width="74%"><font class="90v">非 1 即 0 的整型数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">DECIMAL</font></td>
                        <td valign="top" width="74%"><font class="90v">从 -10^38 +1 到 10^38 -1 的固定精度和标度的数字数据。 </font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">NUMERIC</font></td>
                        <td valign="top" width="74%"><font class="90v">功能上相当于<strong>十进制数。</strong></font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">MONEY</font></td>
                        <td valign="top" width="74%"><font class="90v">从 -2^63 (-922,337,203,685,477.5808) 到 2^63 - 1 (+922,337,203,685,477.5807) 的货币型数据，精确到货币单位的万分之一。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">SMALLMONEY</font></td>
                        <td valign="top" width="74%"><font class="90v">从 -214,748.3648 到 +214,748.3647 的货币型数据，精确到货币单位的万分之一。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">FLOAT</font></td>
                        <td valign="top" width="74%"><font class="90v">从 -1.79E + 308 到 1.79E + 308 的浮点精度数字数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">REAL</font></td>
                        <td valign="top" width="74%"><font class="90v">从 -3.40E + 38 到 3.40E + 38 的浮点精度数字数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">DATETIME</font></td>
                        <td valign="top" width="74%"><font class="90v">从 1753 年 1 月 1 日到 9999 年 12 月 31 日的日期和时间数据，精确到三百分之一秒（3.33 毫秒）。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">SMALLDATETIME</font></td>
                        <td valign="top" width="74%"><font class="90v">从 1900 年 1 月 1 日到 2079 年 6 月 6 日的日期和时间数据，精确到一分钟。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">CHAR</font></td>
                        <td valign="top" width="74%"><font class="90v">最大长度 8000 个字符的固定长度非 Unicode 字符数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">VARCHAR</font></td>
                        <td valign="top" width="74%"><font class="90v">最大长度 8000 个字符的可变长度非 Unicode 字符数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">TEXT</font></td>
                        <td valign="top" width="74%"><font class="90v">最大长度 2^31 - 1 (2,147,483,647) 个字符的可变长度非 Unicode 数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">NCHAR</font></td>
                        <td valign="top" width="74%"><font class="90v">最大长度 4,000 个字符的固定长度 Unicode 数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">NVARCHAR</font></td>
                        <td valign="top" width="74%"><font class="90v">最大长度 4000 个字符的可变长度 Unicode 数据。<strong>sysname </strong>是系统提供的用户定义数据类型，功能上相当于 <strong>nvarchar(128)</strong>，用于引用<a href="http://www.gamvan.com/database/" target="_blank">数据库</a>对象名称。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">NTEXT</font></td>
                        <td valign="top" width="74%"><font class="90v">最大长度 2^31 - 1 (1,073,741,823) 个字符的可变长度 Unicode 数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">BINARY</font></td>
                        <td valign="top" width="74%"><font class="90v">最大长度 8,000 个字节的固定长度二进制数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">VARBINARY</font></td>
                        <td valign="top" width="74%"><font class="90v">最大长度 8,000 个字节的可变长度二进制数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">IMAGE</font></td>
                        <td valign="top" width="74%"><font class="90v">最大长度 2^31 - 1 (2,147,483,647) 字节的可变长度二进制数据。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">CURSOR</font></td>
                        <td valign="top" width="74%"><font class="90v">对光标的引用。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">SQL_VARIANT</font></td>
                        <td valign="top" width="74%"><font class="90v">存储 SQL Server 支持的数据类型（<strong>text</strong>、<strong>ntext</strong>、<strong>timestamp</strong> 和 <strong>sql_variant</strong> 除外）值的数据类型。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">TABLE</font></td>
                        <td valign="top" width="74%"><font class="90v">用于存储结果集合供以后处理的特殊数据类型。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">TIMESTAMP</font></td>
                        <td valign="top" width="74%"><font class="90v">整个<a href="http://www.gamvan.com/database/" target="_blank">数据库</a>中都唯一的一个数字，随着行的每次更新而更新。</font></td>
                    </tr>
                    <tr>
                        <td valign="top" width="26%"><font class="90v">UNIQUEIDENTIFIER</font></td>
                        <td valign="top" width="74%"><font class="90v">全局唯一标识符 (GUID)。</font></td>
                    </tr>
                </tbody>
            </table>
            </p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>&nbsp;</p>
            <p>下表比较了MicrosoftAccess数据库（MicrosoftAccess数据库：数据和对象（如表、查询或窗体）组成的集合，与特定的主题或用途有关。MicrosoftJet数据库引擎用于管理数据。）和MicrosoftAccess项目（MicrosoftAccess项目：与MicrosoftSQLServer数据库连接且用于创建客户/服务器应用程序的Access文件。项目文件中不包含任何数据或基于数据定义的对象（如表或视图）。）的数据类型（数据类型：决定字段可拥有的数据类型的字段特征。数据类型包括Boolean、Integer、Long、Currency、Single、Double、Date、String和Variant（默认））。 </p>
            <p>MicrosoftAccess数据类型SQLServer数据类型 <br />
            是/否（&#8220;是/否&#8221;数据类型：一种字段数据类型，用于只有两种可能值（如是或否、True或False）的字段。不允许有Null值。）bit（bit数据类型：在Access项目中，一种存储值为1或0的数据类型。接受1和0以外的整数值，但总是将其解释为1。） <br />
            数字（&#8220;数字&#8221;数据类型：MicrosoftAccess数据库中的一种字段数据类型，用于将在数学运算中使用的数值数据。但是，若要显示或计算货币值，则应使用&#8220;货币&#8221;数据类型。）（字节）tinyint（tinyint数据类型：Access项目中的一种占一个字节（8位）的数据类型，用于存储从0到255范围内的整数。） <br />
            数字（整型）smallint（smallint数据类型：Access项目中的一种2字节（16位）数据类型，存储位于-2^15(-32,768)与2^15-1(32,767)之间的数字。） <br />
            数字（长整型）int（int数据类型：Access项目中的一种4字节（32位）数据类型，存储位于-2^31(-2,147,483,648)与2^31-1(2,147,483,647)之间的数字。） <br />
            数字（单精度浮点型）real（real数据类型：在Access项目中，一种近似的数值数据类型，精度为7位，正值取值范围大致从1.18E-38到3.40E+38，负值取值范围大致从-1.18E-38到-3.40E+38，也可以取0。） <br />
            （无等价的数据类型）bigint（bigint数据类型：Access项目中的一种8字节（64位）数据类型，存储位于-2^63(-9,223,372,036,854,775,808)与2^63-1(9,223,372,036,854,775,807)之间的数字。） <br />
            数字（双精度浮点型）float（float数据类型：在Access项目中，一种近似的数值数据类型，精度为15位。它所存储的正值范围大致是从2.23E-308到1.79E+308，负值范围大致是从-2.23E-308到-1.79E+308，也可以为0。） <br />
            货币（&#8220;货币&#8221;数据类型：MicrosoftAccess数据库中的一种数据类型，用于与货币有关的计算或其精确度极其重要的定点计算。）money（money数据类型：在Access项目中，用于存储货币值的数据类型，取值范围从-922,337,203,685,477.5707到922,337,203,685,477.5807，精确度为万分之一个货币单位。） </p>
            <p>smallmoney（smallmoney数据类型：Access项目中的一种存储货币值的数据类型，取值范围从-214,748.3648到214,748.3647，精确度为万分之一个货币单位。当显示smallmoney值时，会将它们四舍五入为两个小数位。） <br />
            小数/数值（decimal数据类型（Access数据库）：精确的数值数据类型，用于存储-10^38-1到10^38-1的值。可以指定数值范围（最大总位数）和精度（小数点右边的最大位数）。）decimal（decimal数据类型（Access项目）：精确的数值数据类型，用于存储-10^38-1到10^38-1的值。可以指定数值范围（最大总位数）和精度（小数点右边的最大位数）。） </p>
            <p>numeric（numeric数据类型：在Access项目中，一种精确的数值数据类型，取值从-10^38-1到10^38-1。可以指定数值范围（最大总位数）和精度（小数点右边的最大位数）。） <br />
            日期/时间（&#8220;日期/时间&#8221;数据类型：Access数据库的一种数据类型，用来存放日期和时间信息。）datetime（datetime数据类型：在Access项目中，日期和时间的数据类型，范围从1753年1月1日到9999年12月31日，精确度为三百分之一秒，即3.33毫秒。） </p>
            <p>smalldatetime（smalldatetime数据类型：Access项目中的一种日期和时间数据类型，精度不如datetime时间数据类型。数据取值范围从1900年1月1日到2079年6月6日，精确度为一分钟。） <br />
            自动编号（&#8220;自动编号&#8221;数据类型：MicrosoftAccess数据库中的一种字段数据类型，当向表中添加一条新记录时，这种数据类型会自动为每条记录存储一个唯一的编号。可以产生三种编号：顺序号、随机号和同步复制ID。）（递增）int（int数据类型：Access项目中的一种4字节（32位）数据类型，存储位于-2^31(-2,147,483,648)与2^31-1(2,147,483,647)之间的数字。）（定义了Identity属性） <br />
            文本（&#8220;文本&#8221;数据类型：MicrosoftAccess数据库中的一种字段数据类型。&#8220;文本&#8221;数据类型最多可以包含255个字符，或者是由FieldSize属性指定的一个小一些的字符数。）(n)varchar(n)（varchar(n)数据类型：Access项目中的一种可变长度的数据类型，最大长度为8,000个ANSI字符。） </p>
            <p>nvarchar(n)（nvarchar(n)数据类型：在Access项目中，一种可变长度的数据类型，最多可含4,000个Unicode字符。Unicode字符每字符占两个字节，而且支持所有国际字符。） <br />
            备注（&#8220;备注&#8221;数据类型：在MicrosoftAccess数据库中的一种字段数据类型。&#8220;备注&#8221;字段最多可以包含65,535个字符。）text（text数据类型：Access项目中的一种长度可变的数据类型，最多可存储2^31-1(2,147,483,647)个字符；默认长度为16。） <br />
            OLE对象（&#8220;OLE对象&#8221;数据类型：字段的数据类型之一，用于在其他应用程序中创建的、可链接或嵌入（插入）到Access数据库中的对象。）image（image数据类型：在Access项目中，一种长度可变的数据类型，最多可存储2^31-1(2,147,483,647)字节的二进制数据。image数据类型用来存储BLOB（二进制大对象），如图片、文档、声音和已编译代码。） <br />
            同步复制ID（又名全局唯一标识符（GUID：在Access数据库中，一种用于建立同步复制唯一标识符的16字节字段。GUID用于标识副本、副本集、表、记录和其他对象。在Access数据库中，GUID是指同步复制ID。）(GUID)）uniqueidentifier（uniqueidentifier数据类型：在Access项目中，16字节的全局唯一标识符(GUID)。）（仅适于SQLServer7.0或更高版本） <br />
            超链接（&#8220;超链接&#8221;数据类型：存储超链接地址的Access数据库字段的数据类型。地址最多可以包含四部分，用以下语法格式编写：displaytext#address#subaddress#。）char（char数据类型：在Access项目中，一种固定长度的数据类型，最多可含8,000个ANSI字符。）, </p>
            <p>nchar（nchar数据类型：在Access项目中，一种固定长度的数据类型，最多可含4,000个Unicode字符。Unicode字符每字符占两个字节，而且支持所有国际字符。）,varchar,nvarchar（Hyperlink属性设为Yes） <br />
            （无等价的数据类型）varbinary（varbinary数据类型：Access项目中的一种可变长度的数据类型，最多可存储8,000字节的二进制数据。） <br />
            （无等价的数据类型）smallint（smallint数据类型：Access项目中的一种2字节（16位）数据类型，存储位于-2^15(-32,768)与2^15-1(32,767)之间的数字。） <br />
            （无等价的数据类型）timestamp（timestamp数据类型：在Access项目中，一种每插入或更新一行就会自动更新的数据类型。timestamp列中的值不是datetime数据，而是binary(8)或varbinary(8)，标明了数据修改的顺序。） <br />
            （无等价的数据类型）charnchar <br />
            （无等价的数据类型）sql_variant（sql_variant数据类型：Access项目中的一种数据类型，存储除text、ntext、image、timestamp和sql_variant类型以外的多种数据类型的值。在列、参数、变量或用户定义函数的返回值中使用。） <br />
            （无等价的数据类型）用户定义（用户定义的数据类型：在MicrosoftSQLServer数据库中，允许某列包含的数据的类型定义，由用户利用现有的系统数据类型定义。规则和默认值仅可以绑定到用户定义的数据类型。） </p>
            <p>注释在Access项目或SQLServer数据库中，前缀&#8220;n&#8221;代表&#8220;国家/地区&#8221;，意思是这个数据类型是启用Unicode的。在Access数据库中，全部文本列在默认情况下都是启用Unicode的。</p>
            </div>
            </td>
        </tr>
    </tbody>
</table>
</div>
 <img src ="http://www.blogjava.net/cenly60/aggbug/170414.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/cenly60/" target="_blank">cEnLy.60</a> 2007-12-25 22:54 <a href="http://www.blogjava.net/cenly60/archive/2007/12/25/170414.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>sql2000提示：以前的某个程序安装已在安装计算机上创建挂起的文件操作</title><link>http://www.blogjava.net/cenly60/archive/2007/12/25/170413.html</link><dc:creator>cEnLy.60</dc:creator><author>cEnLy.60</author><pubDate>Tue, 25 Dec 2007 14:51:00 GMT</pubDate><guid>http://www.blogjava.net/cenly60/archive/2007/12/25/170413.html</guid><wfw:comment>http://www.blogjava.net/cenly60/comments/170413.html</wfw:comment><comments>http://www.blogjava.net/cenly60/archive/2007/12/25/170413.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/cenly60/comments/commentRss/170413.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/cenly60/services/trackbacks/170413.html</trackback:ping><description><![CDATA[<div class="cnt"><font size="3">sql2000提示：以前的某个程序安装已在安装计算机上创建挂起的文件操作<br />
问题一：在安装是提示：以前的某个程序安装已在安装计算机上创建挂起的文件操。。。。。<br />
处理方法：<br />
<br />
1。将program files下的sql安装目录删除（此处如果有重要的数据，请先备份）<br />
<br />
c:\program files\microsoft sql server\80\tools。 <br />
c:\program files\microsoft sql server\mssql。<br />
<br />
2。注册表中的相关信息删除：<br />
<br />
hkey_local_machine\software\microsoft\mssqlserver。 <br />
hkey_local_machine\system\currentcontrolset\services\msdtc。 <br />
<br />
3。hkey_local_machine\system\currentcontrolset\control\session manager中找到pendingfilerenameoperations项目，并删除它。这样就可以清除安装暂挂项目<br />
<br />
&nbsp;4。hkey_local_machine\software\microsoft\windows\currentversion\setup<br />
删除exceptioncomponents<br />
<br />
&nbsp;&nbsp; 这个项目下的内容可能很多，只有在上面几个办法不行的情况下，使用此方法（注意不要全部删除）<br />
<br />
删除内容前先看下内容说明<br />
<br />
&nbsp;5。windows&nbsp;&nbsp; 目录中的&nbsp;&nbsp; sqlstp.log&nbsp;&nbsp; 文件，该文件列出了安装程序所执行的操作的详细信息，并包含安装期间遇到的所有错误。通过检查该文件，可以详细了解安装在什么地方失败、为什么失败。 &nbsp;<br />
<br />
6。sql安装的时的错误信息保存在一个叫errorlog的日志文件中，默认情况下该文件位于&nbsp;&nbsp; program&nbsp;&nbsp; files\microsoft&nbsp;&nbsp; sql&nbsp;&nbsp; server\mssql\log&nbsp;&nbsp; 目录中。该错误日志包含安装程序试图启动&nbsp;&nbsp; sql&nbsp;&nbsp; server&nbsp;&nbsp; 时&nbsp;&nbsp; sql&nbsp;&nbsp; server&nbsp;&nbsp; 所遇到的错误，这些信息可以帮助您深入检查错误原因。<br />
<br />
<br />
7。需要检查的另一个组件是&nbsp;&nbsp; microsoft&nbsp;&nbsp; 数据访问组件&nbsp;&nbsp; (mdac)&nbsp;&nbsp; 安装程序，它作为&nbsp;&nbsp; sql&nbsp;&nbsp; server&nbsp;&nbsp; 2000&nbsp;&nbsp; 安装程序的一部分启动。sql&nbsp;&nbsp; server&nbsp;&nbsp; 2000&nbsp;&nbsp; 安装程序会安装&nbsp;&nbsp; mdac&nbsp;&nbsp; 2.6。mdac&nbsp;&nbsp; 安装程序会创建名为&nbsp;&nbsp; dasetup.log&nbsp;&nbsp; 的单独的日志文件；您可以查看此日志文件并确保&nbsp;&nbsp; mdac&nbsp;&nbsp; 安装程序没有出现问题。 </font></div>
<br />
<img src ="http://www.blogjava.net/cenly60/aggbug/170413.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/cenly60/" target="_blank">cEnLy.60</a> 2007-12-25 22:51 <a href="http://www.blogjava.net/cenly60/archive/2007/12/25/170413.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>