forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Su, Xiaomeng <suxiaomeng1@huawei.com> Co-committed-by: Su, Xiaomeng <suxiaomeng1@huawei.com>
164 lines
13 KiB
HTML
164 lines
13 KiB
HTML
<a name="dli_02_0035"></a><a name="dli_02_0035"></a>
|
|
|
|
<h1 class="topictitle1">Deleting a Table</h1>
|
|
<div id="body8662426"><div class="section" id="dli_02_0035__s2d349e15141e4668960a00f6ff6860f9"><h4 class="sectiontitle">Function</h4><p id="dli_02_0035__en-us_topic_0069077906_p25994758">This API is used to delete a specified table.</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0035__sfd6ac9102aa9494b8003fa74d5469f9f"><h4 class="sectiontitle">URI</h4><ul id="dli_02_0035__en-us_topic_0069077906_ul25200620"><li id="dli_02_0035__en-us_topic_0069077906_li25478992">URI format<p id="dli_02_0035__en-us_topic_0069077906_p27984339"><a name="dli_02_0035__en-us_topic_0069077906_li25478992"></a><a name="en-us_topic_0069077906_li25478992"></a>DELETE /v1.0/{project_id}/databases/{database_name}/tables/{table_name}</p>
|
|
</li><li id="dli_02_0035__li8396682257">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0035__en-us_topic_0069077906_table50532462" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="dli_02_0035__en-us_topic_0069077906_row10848276"><th align="left" class="cellrowborder" valign="top" width="18.05%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="dli_02_0035__en-us_topic_0069077906_p16721891910">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.97%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="dli_02_0035__ad95052ace48e4b1dae4922e146dedd6a">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.44%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="dli_02_0035__p125314287553">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.54%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="dli_02_0035__en-us_topic_0069077906_p667268161915">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0035__row13361004219"><td class="cellrowborder" valign="top" width="18.05%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0035__en-us_topic_0069077803_p43412436">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0035__en-us_topic_0069077803_p26746391">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.44%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0035__p1554132816558">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.54%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0035__p1310472724012">Project ID, which is used for resource isolation. For details about how to obtain its value, see <a href="dli_02_0183.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0035__en-us_topic_0069077906_row52544915"><td class="cellrowborder" valign="top" width="18.05%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0035__en-us_topic_0069077906_p28279703">database_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0035__en-us_topic_0069077906_p8954600">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.44%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0035__p1454192855513">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.54%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0035__p1881411134717">Name of the database where the table to be deleted resides.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0035__en-us_topic_0069077906_row18343638"><td class="cellrowborder" valign="top" width="18.05%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="dli_02_0035__en-us_topic_0069077906_p9439749">table_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="dli_02_0035__en-us_topic_0069077906_p26422237">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.44%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="dli_02_0035__p18542028185517">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.54%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="dli_02_0035__p128141811154712">Name of the table to be deleted.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0035__table149304425581" frame="border" border="1" rules="all"><caption><b>Table 2 </b>query parameter description</caption><thead align="left"><tr id="dli_02_0035__row15931164219589"><th align="left" class="cellrowborder" valign="top" width="11.39%" id="mcps1.3.2.2.2.2.2.5.1.1"><p id="dli_02_0035__p16931144219589">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.88%" id="mcps1.3.2.2.2.2.2.5.1.2"><p id="dli_02_0035__p0932164275812">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.33%" id="mcps1.3.2.2.2.2.2.5.1.3"><p id="dli_02_0035__p189325421587">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="63.4%" id="mcps1.3.2.2.2.2.2.5.1.4"><p id="dli_02_0035__p8932134213583">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0035__row193320427581"><td class="cellrowborder" valign="top" width="11.39%" headers="mcps1.3.2.2.2.2.2.5.1.1 "><p id="dli_02_0035__p1293354255814">async</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.88%" headers="mcps1.3.2.2.2.2.2.5.1.2 "><p id="dli_02_0035__p1993310428583">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.33%" headers="mcps1.3.2.2.2.2.2.5.1.3 "><p id="dli_02_0035__p19933642195817">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.4%" headers="mcps1.3.2.2.2.2.2.5.1.4 "><p id="dli_02_0035__p1293314426583">Specifies whether to delete the database in asynchronous mode. The value can be <span class="parmvalue" id="dli_02_0035__parmvalue412051712118"><b>true</b></span> or <span class="parmvalue" id="dli_02_0035__parmvalue3125171711119"><b>false</b></span>. Default value: <strong id="dli_02_0035__b679121816117">false</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note" id="dli_02_0035__note17453514715"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="dli_02_0035__p97492512710">The following is an example of the URL containing the <strong id="dli_02_0035__b197151019121115">query</strong> parameter:</p>
|
|
<p id="dli_02_0035__p229613284816">DELETE /v1.0/{project_id}/databases/{database_name}/tables/{table_name}?async=<i><span class="varname" id="dli_02_0035__varname102966284819">{is_async</span></i>}</p>
|
|
</div></div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dli_02_0035__sd0ef5ed1b26f43148e95ba4c429d8118"><h4 class="sectiontitle">Request</h4><p id="dli_02_0035__p44419019152830">None</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0035__sdfcca47f89e8469297f25779350d2a12"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0035__en-us_topic_0069077906_table42859132" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameters</caption><thead align="left"><tr id="dli_02_0035__en-us_topic_0069077906_row29751386"><th align="left" class="cellrowborder" valign="top" width="12.06%" id="mcps1.3.4.2.2.5.1.1"><p id="dli_02_0035__a782c5f30be834f5b87fd3e27865c89ce">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10.83%" id="mcps1.3.4.2.2.5.1.2"><p id="dli_02_0035__p1263184213249">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.41%" id="mcps1.3.4.2.2.5.1.3"><p id="dli_02_0035__a2fdba823f91c4fc283e9772c02455fca">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="64.7%" id="mcps1.3.4.2.2.5.1.4"><p id="dli_02_0035__abb2a4bd91399417c97999752f2881d93">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0035__en-us_topic_0069077906_row31283896"><td class="cellrowborder" valign="top" width="12.06%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0035__en-us_topic_0069077906_p50967639">is_success</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.83%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0035__p463174212415">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.41%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0035__en-us_topic_0069077906_p62324272">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.7%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0035__p314716444149">Indicates whether the request is successfully executed. Value <span class="parmvalue" id="dli_02_0035__parmvalue51047969161022"><b>true</b></span> indicates that the request is successfully executed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0035__en-us_topic_0069077906_row1693441"><td class="cellrowborder" valign="top" width="12.06%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0035__en-us_topic_0069077906_p2951005">message</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.83%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0035__p176364211242">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.41%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0035__en-us_topic_0069077906_p34196316">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.7%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0035__p71478444148">System prompt. If execution succeeds, the parameter setting may be left blank.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0035__row1877216331430"><td class="cellrowborder" valign="top" width="12.06%" headers="mcps1.3.4.2.2.5.1.1 "><p id="dli_02_0035__p222905218240">job_mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10.83%" headers="mcps1.3.4.2.2.5.1.2 "><p id="dli_02_0035__p3229125212417">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.41%" headers="mcps1.3.4.2.2.5.1.3 "><p id="dli_02_0035__p922911524243">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="64.7%" headers="mcps1.3.4.2.2.5.1.4 "><p id="dli_02_0035__p4229105292420">Job execution mode. The options are as follows:</p>
|
|
<ul id="dli_02_0035__ul194411241202517"><li id="dli_02_0035__li16442124112518"><strong id="dli_02_0035__b164621553912">async</strong>: asynchronous</li><li id="dli_02_0035__li2441252182510"><strong id="dli_02_0035__b104261256391">sync</strong>: synchronous</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0035__section1835742415112"><h4 class="sectiontitle">Example Request</h4><p id="dli_02_0035__p810253431112">None</p>
|
|
</div>
|
|
<div class="section" id="dli_02_0035__section3979549315273"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="dli_02_0035__screen44251137152738">{
|
|
"is_success": true,
|
|
"message": ""
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="dli_02_0035__sf39cfd445ad24e9e82754fcb0027179d"><h4 class="sectiontitle">Status Codes</h4><p id="dli_02_0035__a04144ca3a08e4576b386c6a98f43a2ae"><a href="#dli_02_0035__tb12870f1c5f24b27abd55ca24264af36">Table 4</a> describes the status code.</p>
|
|
|
|
<div class="tablenoborder"><a name="dli_02_0035__tb12870f1c5f24b27abd55ca24264af36"></a><a name="tb12870f1c5f24b27abd55ca24264af36"></a><table cellpadding="4" cellspacing="0" summary="" id="dli_02_0035__tb12870f1c5f24b27abd55ca24264af36" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status codes</caption><thead align="left"><tr id="dli_02_0035__r8d54231f95b14c01a5e55e95f3b2e838"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.7.3.2.3.1.1"><p id="dli_02_0035__ab49d21f312644072a331f43e92baf853">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.7.3.2.3.1.2"><p id="dli_02_0035__aea1d3bd107bb4c499da79a88832d256c">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dli_02_0035__r211ad4eb571d4d938e5579998723174e"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0035__a3153e07b3a9749adba92599fe6628fbf">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0035__p104431642124811">Deletion succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0035__row44937531727"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0035__p184941532219">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0035__p2049413539219">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dli_02_0035__row65331212142411"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.7.3.2.3.1.1 "><p id="dli_02_0035__p5537171216249">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.7.3.2.3.1.2 "><p id="dli_02_0035__p953813124249">Internal service error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dli_02_0035__section13596141025715"><h4 class="sectiontitle">Error Codes</h4><p id="dli_02_0035__p420584425712">If an error occurs when this API is invoked, the system does not return the result similar to the preceding example, but returns the error code and error information. For details, see <a href="dli_02_0056.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dli_02_0031.html">Table-related APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|