mysql数据类型介绍

本文详细介绍了MySQL中的各种数据类型及其特点,包括整型、浮点数、定点数、日期时间类型、字符串类型、二进制类型及枚举与集合类型等。通过本文,读者可以了解到每种数据类型的存储长度、取值范围以及使用场景。
摘要由CSDN通过智能技术生成
<div>
<div style="font-size: 14px; padding-top: 0px; padding-right: 20px; padding-bottom: 0px; padding-left: 20px; line-height: 23px;">
<div><span style="font-family: 宋体; line-height: normal; font-size: 12px;">其中的长度以字节为单位</span></div>
<div align="center">

<table cellspacing="0" cellpadding="0" border="1" style="border-right-width: medium; border-right-style: none; border-right-color: initial; border-top-width: medium; border-top-style: none; border-top-color: initial; border-left-width: medium; border-left-style: none; border-left-color: initial; border-bottom-width: medium; border-bottom-style: none; border-bottom-color: initial; border-collapse: collapse;">

<tbody>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; border-top-color: windowtext; border-top-width: 1pt; border-top-style: solid; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>名称</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; border-top-color: windowtext; border-top-width: 1pt; border-top-style: solid; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>长度</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; border-top-color: windowtext; border-top-width: 1pt; border-top-style: solid; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>用法</div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>TINYINT(M)</div>
<div> </div>
<div>BIT,BOOL,BOOLEAN</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>1</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>如果为无符号数,可以存储从0到255的数;</div>
<div> </div>
<div>否则可以存储从-128到127的数。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>SMALLINT(M)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>2</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>如果为无符号数,可以存储从0到65535的数;</div>
<div> </div>
<div>否则可以存储从-32768到32767的数。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>MEDIUMINT(M)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>3</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>如果为无符号数,可以存储从0到16777215的数;否则可以存储从-8388608到8388607的数</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>INT(M)</div>
<div> </div>
<div>INTEGER(M)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>4</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>
如果为无符号数,可以存储从0到4294967295的数,否则可以存储从-2147483648到2147483647的数。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>BIGINT(M)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>8</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>
如果为无符号数,可以存储从0到18446744073709551615的数,否则可以存储从-9223372036854775808到9223372036854775807的数。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>FLOAT(precision)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>4或8</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>
这里的precision是可以直达53的整数。如果precision<=24则转换为FLOAT,如果precision>24并且precision<=53则转换为DOUBLE。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>FLOAT(M,D)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>4</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>单精度浮点数。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>DOUBLE(M,D),</div>
<div> </div>
<div>DOUBLE PRECISION,</div>
<div> </div>
<div>REAL</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>8</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>双精度浮点。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>DECIMAL(M,D),</div>
<div> </div>
<div>DEC,NUMERIC,FIXED</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>M+1或M+2</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>未打包的浮点数。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>DATE</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>3</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>以YYYY-MM-DD的格式显示。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>DATETIME</div>
<div> </div>
<div>HH:MM:SS</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>8</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>以YYYY-MM-DD的格式显示。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>TIMESTAMP</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>4</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>以YYYY-MM-DD的格式显示。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>TIME</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>3</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>以HH:MM:SS的格式显示。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>YEAR</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>1</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>以YYYY的格式显示。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>CHAR(M)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>M</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>定长字符串。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>VARCHAR(M)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>最大M</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>变长字符串。M<=255.</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>TINYBLOB,</div>
<div> </div>
<div>TINYTEXT</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>最大255</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>TINYBLOB为大小写敏感,而TINYTEXT不是大小写敏感的。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>BLOB,</div>
<div> </div>
<div>TEXT</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>最大64K</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>BLOB为大小敏感的,而TEXT不是大小写敏感的。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>MEDIUMBLOB,</div>
<div> </div>
<div>MEDIUMTEXT</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>最大16M</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>MEDIUMBLOB为大小写敏感的,而MEDIUMTEXT不是大小敏感的。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>LONGBLOB,</div>
<div> </div>
<div>LONGTEXT</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>最大4G</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>LONGBLOB为大小敏感的,而LONGTEXT不是大小敏感的。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>ENUM(VALUE1,….)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>1或2</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>最大可达65535个不同的值。</div>
<div> </div>
</td>
</tr>

<tr>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; border-left-color: windowtext; border-left-width: 1pt; border-left-style: solid; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>SET(VALUE1,….)</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>可达8</div>
<div> </div>
</td>
<td valign="top" style="font-size: 12px; color: rgb(0, 0, 0); font-family: 宋体; border-right-color: windowtext; border-right-width: 1pt; border-right-style: solid; padding-right: 5.4pt; padding-left: 5.4pt; border-left-color: rgb(235, 233, 237); padding-bottom: 0cm; border-top-color: rgb(235, 233, 237); padding-top: 0cm; border-bottom-color: windowtext; border-bottom-width: 1pt; border-bottom-style: solid; background-color: transparent;">
<div>最大可达64个不同的值。</div>
<div> </div>
<div><br></div>
</td>
</tr>

</tbody>

</table>
</div>
</div>
</div>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值