forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
42 lines
3.5 KiB
HTML
42 lines
3.5 KiB
HTML
<a name="mrs_01_1427"></a><a name="mrs_01_1427"></a>
|
|
|
|
<h1 class="topictitle1">DROP TABLE</h1>
|
|
<div id="body1595920210860"><div class="section" id="mrs_01_1427__seadaefdd34cb4330a6759ea33b55e675"><h4 class="sectiontitle">Function</h4><p id="mrs_01_1427__ae3794750b218454587e096c0316d4668">This command is used to delete an existing table. </p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1427__sb5971ce54a444ba585c082941c726148"><h4 class="sectiontitle">Syntax</h4><p id="mrs_01_1427__ad0d8faaed42346089db0495908fd8af9"><b><span class="cmdname" id="mrs_01_1427__cmdname136571038182615">DROP TABLE</span></b> <i><span class="varname" id="mrs_01_1427__vef9e52cde0b840e583b710f6b57d8725">[IF EXISTS] [db_name.]table_name;</span></i></p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1427__s5e202cfd3a704ab29af91a11821e5cee"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1427__tb1a5289dd4824e67a2741df78e3c0f8e" frame="border" border="1" rules="all"><caption><b>Table 1 </b>DROP TABLE parameters</caption><thead align="left"><tr id="mrs_01_1427__rc7c476b054ad460cbd2e42a72a095c5d"><th align="left" class="cellrowborder" valign="top" width="19.74%" id="mcps1.3.3.2.2.3.1.1"><p id="mrs_01_1427__a625b39a87c23459aaa50267e3a0ce6cb"><strong id="mrs_01_1427__b154501945115715">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="80.25999999999999%" id="mcps1.3.3.2.2.3.1.2"><p id="mrs_01_1427__a0c499d01aeff4b139155f7aeefb99d55"><strong id="mrs_01_1427__b1385245114577">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1427__r71fa9e3a8fbf4ff484174efff6983859"><td class="cellrowborder" valign="top" width="19.74%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_1427__a53b607406d914fdf967c1e31d858e7c5">db_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="80.25999999999999%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_1427__a9cc9e12bb5fd49248863d1b9bff2f408">Database name. If this parameter is not specified, the current database is selected.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1427__rba04127737704719950c15492aed125f"><td class="cellrowborder" valign="top" width="19.74%" headers="mcps1.3.3.2.2.3.1.1 "><p id="mrs_01_1427__ae71b457cf8834973953435644dbacb9e">table_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="80.25999999999999%" headers="mcps1.3.3.2.2.3.1.2 "><p id="mrs_01_1427__a09e63f40f5be4995b35cbb541187332f">Name of the table to be deleted</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1427__sa5a0bdd37e09400c8d928704368e7295"><h4 class="sectiontitle">Precautions</h4><p id="mrs_01_1427__ac8004535651c4de89a9e3483afdacd5d">In this command, <strong id="mrs_01_1427__b5147712585">IF EXISTS</strong> and <strong id="mrs_01_1427__b415211195817">db_name</strong> are optional.</p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1427__s7024684741584366abe9983615938b8d"><h4 class="sectiontitle">Example</h4><p id="mrs_01_1427__a3a4671f590ac4be69f424aed582b58d4"><b><span class="cmdname" id="mrs_01_1427__cmdname1177016237120">DROP TABLE IF EXISTS productDatabase.productSalesTable;</span></b></p>
|
|
</div>
|
|
<div class="section" id="mrs_01_1427__se8fbd108173a46cca6ca9438080264e0"><h4 class="sectiontitle">System Response</h4><p id="mrs_01_1427__a632b30138a064d7fbeeaf4c80249d012">The table will be deleted.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_1424.html">DDL</a></div>
|
|
</div>
|
|
</div>
|
|
|