doc-exports/docs/dws/tool/dws_16_0040.html
Lu, Huayi 27019c2991 DWS TOOL 830.201 version
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>
2024-05-16 07:35:25 +00:00

173 lines
18 KiB
HTML

<a name="EN-US_TOPIC_0000001772696096"></a><a name="EN-US_TOPIC_0000001772696096"></a>
<h1 class="topictitle1">Data Type</h1>
<div id="body8662426">
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_table72268319581" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row82261031145816"><th align="center" class="cellrowborder" valign="top" width="11.52%" id="mcps1.3.1.1.4.1.1"><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1562719115298">Data Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="46.239999999999995%" id="mcps1.3.1.1.4.1.2"><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p42261931125820"><strong id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_b8716162611507">Input</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.24%" id="mcps1.3.1.1.4.1.3"><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p12226631155819"><strong id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_b18719132615016">Output</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row02261931155817"><td class="cellrowborder" rowspan="10" align="center" valign="top" width="11.52%" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p230817517296">Numeric</p>
</td>
<td class="cellrowborder" valign="top" width="46.239999999999995%" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p9107134815018">BIGINT</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p710712482015">BIGINT</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row17226113114583"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p161076481505">BYTEINT</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p81071481409">SMALLINT</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row6226131205811"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1210714811013">DECIMAL [(n[,m])]</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1410712489016">DECIMAL [(n[,m])]</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row5226831195815"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p14107134811020">DOUBLE PRECISION</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1010794819020">DOUBLE PRECISION</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row1922613311587"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p5107134819015">FLOAT</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1410719488015">DOUBLE PRECISION</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row172261031165812"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p12108248308">INT / INTEGER</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p131088483016">INTEGER</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row25313264019"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p19108648403">NUMBER / NUMERIC</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p31083481305">NUMERIC</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row9601739105"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1110884814011">NUMBER(n[,m])</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p181081248407">NUMERIC (n[,m])</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row56017391015"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p141082484011">REAL</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1010818486012">REAL</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row1360123910013"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1110864816010">SMALLINT</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p15108148609">SMALLINT</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row3606391801"><td class="cellrowborder" rowspan="4" align="center" valign="top" width="11.52%" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p18491828133014">Character</p>
</td>
<td class="cellrowborder" valign="top" width="46.239999999999995%" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p176986291611">CHAR[(n)] / CHARACTER [(n)]</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p76981629819">CHAR(n)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row960539203"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1469817292114">CLOB</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p19698132910116">CLOB</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row94841419113"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1698329912">LONG VARCHAR</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p169810291817">TEXT</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row24841019119"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1669810295112">VARCHAR(n) / CHAR VARYING(n) / CHARACTER VARYING(n)</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p12698132919118">VARCHAR(n)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row183171813819"><td class="cellrowborder" rowspan="5" align="center" valign="top" width="11.52%" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1441842310315">Date/Time</p>
</td>
<td class="cellrowborder" valign="top" width="46.239999999999995%" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p186981329810">DATE</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1869813291116">DATE</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row203178132014"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1769819295119">TIME [(n)]</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p176987291619">TIME [(n)]</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row33170131419"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1369810296110">TIME [(n)] WITH TIME ZONE</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p10698629217">TIME [(n)] WITH TIME ZONE</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row33181213116"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p36991329711">TIMESTAMP [(n)]</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p76997291115">TIMESTAMP [(n)]</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row1931811139115"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p106992296116">TIMESTAMP [(n)] WITH TIME ZONE</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1699829612">TIMESTAMP [(n)] WITH TIME ZONE</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row131815131318"><td class="cellrowborder" rowspan="5" align="center" valign="top" width="11.52%" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p10439144623120">Range</p>
</td>
<td class="cellrowborder" valign="top" width="46.239999999999995%" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1218249920">PERIOD(DATE)</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1618249620">daterange</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row1718217461811"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p10182191026">PERIOD(TIME [(n)])</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p151836913216">tsrange [(n)]</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row16182124618111"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p14183109824">PERIOD(TIME WITH TIME ZONE)</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p14183149226">tstzrange</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row1018210461212"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p9183692213">PERIOD(TIMESTAMP [(n)])</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p141831293220">tsrange [(n)]</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row19920451019"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1718318911216">PERIOD(TIMESTAMP WITH TIME ZONE)</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p4183491727">tstzrange</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row199201951512"><td class="cellrowborder" rowspan="3" align="center" valign="top" width="11.52%" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p8565326327">Binary</p>
</td>
<td class="cellrowborder" valign="top" width="46.239999999999995%" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p151831191929">BLOB[(n)]</p>
</td>
<td class="cellrowborder" valign="top" width="42.24%" headers="mcps1.3.1.1.4.1.3 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p5183169223">blob</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row10922251513"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p1818329422">BYTE[(n)]</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p20183139327">bytea</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_row119223510115"><td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.1 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p11184119625">VARBYTE[(n)]</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.1.1.4.1.2 "><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p10184109126">bytea</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_section11692145117610"><h4 class="sectiontitle">BYTEINT</h4><p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p8585253265"><strong id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_b56610361281">Input</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_screen8521033071">select cast(col as byteint) from tab;</pre>
<p id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_p11451658765"><strong id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_b18505153820816">Output</strong></p>
</div>
<pre class="screen" id="EN-US_TOPIC_0000001772696096__en-us_topic_0000001657865562_en-us_topic_0000001382208090_screen198443211187">SELECT CAST( col AS SMALLINT ) FROM tab ;</pre>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0036.html">Teradata Syntax Migration</a></div>
</div>
</div>