doc-exports/docs/dws/tool/dws_07_6821.html
Lu, Huayi 346ac31da9 DWS TG 8.1.3.200 VERSION
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Reviewed-by: Jiang, Beibei <beibei.jiang@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2023-08-28 09:20:17 +00:00

124 lines
9.4 KiB
HTML

<a name="EN-US_TOPIC_0000001234200647"></a><a name="EN-US_TOPIC_0000001234200647"></a>
<h1 class="topictitle1">Tables</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_section1332761015481"><a name="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_section1332761015481"></a><a name="en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_section1332761015481"></a><h4 class="sectiontitle">Distribution Key</h4><p id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_p1356213123481">DISTRIBUTE ON (column) should be migrated to DISTRIBUTE BY HASH (column).</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_table1493211531215" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_row69323534212"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.1.3.1.3.1.1"><p id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_p17923454161720"><strong id="EN-US_TOPIC_0000001234200647__b1922414682014">Netezza Syntax</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.1.3.1.3.1.2"><p id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_p7923754181716"><strong id="EN-US_TOPIC_0000001234200647__b152847486206">Syntax After Migration</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_row1693314531223"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.1.3.1.3.1.1 "><pre class="screen" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_screen40133673">CREATE TABLE N_AG_AMT_H
(
AG_NO national character varying(50) not null,
AG_CATEG_CD national character varying(12) not null,
AMT_TYPE_CD national character varying(12) not null,
DATA_START_DT date not null,
CCY_CD national character varying(3) not null,
DATA_END_DT date
)
DISTRIBUTE ON (AG_NO, AG_CATEG_CD, AMT_TYPE_CD)
ORGANIZE ON (AG_CATEG_CD, AMT_TYPE_CD, DATA_END_DT)
;</pre>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.1.3.1.3.1.2 "><pre class="screen" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_screen9656680">CREATE TABLE N_AG_AMT_H
(
AG_NO national character varying(50) not null,
AG_CATEG_CD national character varying(12) not null,
AMT_TYPE_CD national character varying(12) not null,
DATA_START_DT date not null,
CCY_CD national character varying(3) not null,
DATA_END_DT date
) WITH(ORIENTATION=COLUMN)
DISTRIBUTE BY HASH (AG_NO, AG_CATEG_CD, AMT_TYPE_CD)
/* ORGANIZE ON (AG_CATEG_CD, AMT_TYPE_CD, DATA_END_DT) */
;</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_section15902134185010"><a name="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_section15902134185010"></a><a name="en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_section15902134185010"></a><h4 class="sectiontitle">ORGANIZE ON</h4><p id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_p165581236175016">ORGANIZE ON will be commented out.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_table148514214319" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_row1985102111314"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.3.1.3.1.1"><p id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_p18897341186"><strong id="EN-US_TOPIC_0000001234200647__b1395575311204">Netezza Syntax</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.3.1.3.1.2"><p id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_p48913345188"><strong id="EN-US_TOPIC_0000001234200647__b575105502012">Syntax After Migration</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_row8855211318"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.1.3.1.1 "><pre class="screen" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_screen12819293">CREATE TABLE N_AG_AMT_H
(
AG_NO national character varying(50) not null,
AG_CATEG_CD national character varying(12) not null,
AMT_TYPE_CD national character varying(12) not null,
DATA_START_DT date not null,
CCY_CD national character varying(3) not null,
DATA_END_DT date
)
DISTRIBUTE ON (AG_NO, AG_CATEG_CD, AMT_TYPE_CD)
ORGANIZE ON (AG_CATEG_CD, AMT_TYPE_CD, DATA_END_DT)
;</pre>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.1.3.1.2 "><pre class="screen" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_screen36929730">CREATE TABLE N_AG_AMT_H
(
AG_NO national character varying(50) not null,
AG_CATEG_CD national character varying(12) not null,
AMT_TYPE_CD national character varying(12) not null,
DATA_START_DT date not null,
CCY_CD national character varying(3) not null,
DATA_END_DT date
) WITH(ORIENTATION=COLUMN)
DISTRIBUTE BY HASH (AG_NO, AG_CATEG_CD, AMT_TYPE_CD)
/* ORGANIZE ON (AG_CATEG_CD, AMT_TYPE_CD, DATA_END_DT)*/
;</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_section4495931920"><h4 class="sectiontitle">Large Field Type</h4><p id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_p9921961917">The row-store supports BLOB and CLOB. Column storage does not support BLOB, but it supports CLOB.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_table5504991915" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_row14921693198"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.1.3.1.1"><p id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_p1492189101911"><strong id="EN-US_TOPIC_0000001234200647__en-us_topic_0237712526_b825811552594">Netezza Syntax</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.1.3.1.2"><p id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_p1392209141912"><strong id="EN-US_TOPIC_0000001234200647__en-us_topic_0237712526_b81851635102616">Syntax After Migration</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_row189213941917"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.1.3.1.1 "><pre class="screen" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_screen1792159111913">CREATE TABLE prod
(
prod_no number(6) not null,
prod_name national character varying(32) not null,
prod_desc clob,
prod_image blob
)
DISTRIBUTE ON (prod_no, prod_name)
ORGANIZE ON (prod_no, prod_name)
;</pre>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.1.3.1.2 "><pre class="screen" id="EN-US_TOPIC_0000001234200647__en-us_topic_0238518431_en-us_topic_0237362467_en-us_topic_0202685975_screen129249161919">CREATE TABLE prod
(
prod_no number(6) not null,
prod_name national character varying(32) not null,
prod_desc clob,
prod_image bytea
) WITH(ORIENTATION=COLUMN)
DISTRIBUTE BY HASH (prod_no, prod_name)
/* ORGANIZE ON (prod_no, prod_name) */
;</pre>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_07_0682.html">Netezza Syntax Migration</a></div>
</div>
</div>