forked from docs/doc-exports
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
40 lines
4.2 KiB
HTML
40 lines
4.2 KiB
HTML
<a name="mrs_01_24269"></a><a name="mrs_01_24269"></a>
|
|
|
|
<h1 class="topictitle1">ALTER ADD COLUMNS</h1>
|
|
<div id="body8662426"><div class="section" id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_sa1cb229bf26b4a7a8efd1716defb63de"><h4 class="sectiontitle">Function</h4><p id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_ac917e6d6e78044e99179c0e0f5284232">This command is used to add columns to an existing table.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_sc019b10a59e9426498a678c024d74f03"><h4 class="sectiontitle">Syntax</h4><p id="mrs_01_24269__en-us_topic_0000001219029189_p2071145618449"><strong id="mrs_01_24269__en-us_topic_0000001219029189_b109162289391">ALTER TABLE </strong><em id="mrs_01_24269__en-us_topic_0000001219029189_i199563220397">tableIdentifier</em><strong id="mrs_01_24269__en-us_topic_0000001219029189_b1386064203920"> ADD COLUMNS</strong><em id="mrs_01_24269__en-us_topic_0000001219029189_i84901347113911">(colAndType (,colAndType)*)</em></p>
|
|
</div>
|
|
<div class="section" id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_s253f086de08745ac890027c0b103cd7a"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_ta69e9ecdc1554375a8a1e844b14e00c5" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters</caption><thead align="left"><tr id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_r61ddb6139b8d4f4ca4a88c6389f8f327"><th align="left" class="cellrowborder" valign="top" width="24.89%" id="mcps1.3.3.2.2.3.1.1"><p id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_aeb0bfa560fb74f1f9e584cc1ef05bb9b">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="75.11%" id="mcps1.3.3.2.2.3.1.2"><p id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_ae81789e97e6d4953a8342f22d64feea9">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_r4a578c7015ba461bab46a5c40c46256a"><td class="cellrowborder" valign="top" width="24.89%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_ac25da7f69c964d93947693ed5b4006cb">tableIdentifier</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="75.11%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_a09288a5af7f44e36922b37de34446d94">Table name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_rbf8f7998df2b40979c8e9e64d667e180"><td class="cellrowborder" valign="top" width="24.89%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_a440446fee79947738959536aa886e611">colAndType</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="75.11%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_a9e6c31cb47f84b3d920a2ac5563ed7bf">Name of a comma-separated column with data types. A column name consists of letters, digits, and underscores (_).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_s55536c9c534643ed8272f9f4b47fb407"><h4 class="sectiontitle">Examples</h4><pre class="screen" id="mrs_01_24269__en-us_topic_0000001219029189_screen158063184013">alter table h0_1 add columns(ext0 string);</pre>
|
|
</div>
|
|
<div class="section" id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_sbd5eea8637c94038bf6a129ab9ca129f"><h4 class="sectiontitle">System Response</h4><p id="mrs_01_24269__en-us_topic_0000001219029189_en-us_topic_0265792790_ab3f2ebd199c342fb9103cbe4f02c7148">The columns are added to the table. You can run the <strong id="mrs_01_24269__en-us_topic_0000001219029189_b912184820101256">DESCRIBE</strong> command to display the columns.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24263.html">Hudi DDL</a></div>
|
|
</div>
|
|
</div>
|
|
|