forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
76 lines
7.5 KiB
HTML
76 lines
7.5 KiB
HTML
<a name="EN-US_TOPIC_0000001819336165"></a><a name="EN-US_TOPIC_0000001819336165"></a>
|
|
|
|
<h1 class="topictitle1">LOB Types</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_section1122153842419"><h4 class="sectiontitle">Overview</h4><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164683_p8060118">A BLOB is a binary large object that can hold a variable amount of data. The four BLOB types are TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB. The only difference between these four types is the maximum length of the values they can contain. DSC supports the following type conversions:</p>
|
|
<div class="note" id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_note171981836214"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_p131986361917">The BLOB type can store images. Column storage does not support BLOB.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_section1745405018240"><h4 class="sectiontitle">Type Mapping</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_table2963807555" frame="border" border="1" rules="all"><caption><b>Table 1 </b>LOB type mapping</caption><thead align="left"><tr id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_row69651305552"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.4.1.1"><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p8965120175510">MySQL LOB Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.4.1.2"><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p119659014558">MySQL INPUT</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.4.1.3"><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p18965106550">GaussDB(DWS) OUTPUT</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_row14965909554"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p696570155519">TINYBLOB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p1296520015520">TINYBLOB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p169655005510">BLOB</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_row1996511017553"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p1496590115511">BLOB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p296511095519">BLOB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p596512012556">BLOB</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_row1596515014551"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p3965140155513">MEDIUMBLOB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p19652005556">MEDIUMBLOB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p139653014558">BLOB</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_row596515013552"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p9965130105517">LONGBLOB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p19656014553">LONGBLOB</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p896519010552">BLOB</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p18363951165611"><strong id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_b20687493593221">Input: [TINY|MEDIUM|LONG]BLOB</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_screen15454174275716">CREATE TABLE IF NOT EXISTS `runoob_dataType_test`(
|
|
`dataType_1` BIGINT,
|
|
`dataType_2` TINYBLOB,
|
|
`dataType_3` BLOB,
|
|
`dataType_4` MEDIUMBLOB,
|
|
`dataType_5` LONGBLOB
|
|
);</pre>
|
|
<p id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_p39841145500"><strong id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_b125931419119">Output</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001819336165__en-us_topic_0000001658024526_en-us_topic_0000001433748357_en-us_topic_0214164666_screen19867711119">CREATE TABLE IF NOT EXISTS "public"."runoob_datatype_test"
|
|
(
|
|
"datatype_1" BIGINT,
|
|
"datatype_2" BLOB,
|
|
"datatype_3" BLOB,
|
|
"datatype_4" BLOB,
|
|
"datatype_5" BLOB
|
|
)
|
|
WITH ( ORIENTATION = ROW, COMPRESSION = NO )
|
|
NOCOMPRESS
|
|
DISTRIBUTE BY HASH ("datatype_1");</pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0106.html">Data Types</a></div>
|
|
</div>
|
|
</div>
|
|
|