doc-exports/docs/dws/tool/dws_16_0086.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

23 lines
2.4 KiB
HTML

<a name="EN-US_TOPIC_0000001819336133"></a><a name="EN-US_TOPIC_0000001819336133"></a>
<h1 class="topictitle1">INSERT</h1>
<div id="body8662426"><p id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_p1430752710418">The Teradata <strong id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_b121092162632219">INSERT</strong> (<a href="dws_16_0054.html#EN-US_TOPIC_0000001772696108">short key</a> INS) statement is used to insert records into a table. DSC supports the <strong id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_b41280374432219">INSERT</strong> statement.</p>
<p id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_p16938356121816">The <strong id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_b170202823432219">INSERT INTO TABLE table_name</strong> syntax is used in Teradata SQL, but is not supported by GaussDB(DWS). GaussDB(DWS) supports only <strong id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_b107491719402">INSERT INTO table_name</strong>. Therefore, remove the keyword <strong id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_b21408779832219">TABLE</strong> when using DSC.</p>
<p id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_p153171341142019"><strong id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_b1998848172019">Input</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_screen34181629142210">INSERT TABLE tab1
SELECT col1, col2
FROM tab2
WHERE col3 &gt; 0;</pre>
<p id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_p1067110422201"><strong id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_b1441749102013">Output</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001819336133__en-us_topic_0000001657865198_en-us_topic_0000001434910257_screen6214336224">INSERT INTO tab1
SELECT col1, col2
FROM tab2
WHERE col3 &gt; 0;</pre>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0084.html">Data Manipulation Language (DML)</a></div>
</div>
</div>