> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# clearTable

<div className="kinetica-doxygen">
  <div id="a438f915ee5d2c8e5c624610842f47b34" />

  <h2 className="memtitle"><span className="permalink"><a href="#a438f915ee5d2c8e5c624610842f47b34">◆ </a></span>clearTable() <span className="overload">\[1/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">ClearTableResponse</a> gpudb::GPUdb::clearTable </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableRequest">ClearTableRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span></td>
          <td>)</td>
          <td> const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Clears (drops) one or all tables in the database cluster. </p>
      <p>The operation is synchronous meaning that the table will be cleared before the function returns. The response payload returns the status of the operation along with the name of the table that was cleared.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableRequest">Request</a> object containing the parameters for the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a05977053bbeeee30aef9c3eccf98bdf3" />

  <h2 className="memtitle"><span className="permalink"><a href="#a05977053bbeeee30aef9c3eccf98bdf3">◆ </a></span>clearTable() <span className="overload">\[2/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">ClearTableResponse</a> & gpudb::GPUdb::clearTable </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableRequest">ClearTableRequest</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">request\_</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">ClearTableResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Clears (drops) one or all tables in the database cluster. </p>
      <p>The operation is synchronous meaning that the table will be cleared before the function returns. The response payload returns the status of the operation along with the name of the table that was cleared.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">request\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableRequest">Request</a> object containing the parameters for the operation. </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a52e2ee9452af707377a8cca0af68320d" />

  <h2 className="memtitle"><span className="permalink"><a href="#a52e2ee9452af707377a8cca0af68320d">◆ </a></span>clearTable() <span className="overload">\[3/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">ClearTableResponse</a> gpudb::GPUdb::clearTable </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">authorization</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Clears (drops) one or all tables in the database cluster. </p>
      <p>The operation is synchronous meaning that the table will be cleared before the function returns. The response payload returns the status of the operation along with the name of the table that was cleared.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">tableName</td>
              <td>Name of the table to be cleared, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing table. Empty string clears all available tables, though this behavior is be prevented by default via gpudb.conf parameter 'disable\_clear\_all'. The default value is ''. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">authorization</td>
              <td>No longer used. User can pass an empty string. The default value is ''. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#adea8b5fd768ea481c4324cedafc8ccc0">clear\_table\_no\_error\_if\_not\_exists</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a19066cad9fd313d9af1c6e6b7abfaaf5">true</a> and if the table specified in <span className="em arg">tableName</span> does not exist no error is returned. If <a className="el" href="/content/api/cpp/namespacegpudb#a8ce33841713205619a147b0e16df489b">false</a> and if the table specified in <span className="em arg">tableName</span> does not exist then an error is returned. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a19066cad9fd313d9af1c6e6b7abfaaf5">clear\_table\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a8ce33841713205619a147b0e16df489b">clear\_table\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a8ce33841713205619a147b0e16df489b">clear\_table\_false</a>.
                  </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="ae372d9957b28f88e656b4a683fc7de41" />

  <h2 className="memtitle"><span className="permalink"><a href="#ae372d9957b28f88e656b4a683fc7de41">◆ </a></span>clearTable() <span className="overload">\[4/4]</span></h2>

  <div className="memitem">
    <div className="memproto">
      <table className="memname">
        <tr>
          <td className="memname"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">ClearTableResponse</a> & gpudb::GPUdb::clearTable </td>
          <td>(</td>
          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableName</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::string &</td>
          <td className="paramname"><span className="paramname"><span className="em">authorization</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype">const std::map\< std::string, std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">options</span></span>, </td>
        </tr>

        <tr>
          <td className="paramkey" />

          <td />

          <td className="paramtype"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">ClearTableResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Clears (drops) one or all tables in the database cluster. </p>
      <p>The operation is synchronous meaning that the table will be cleared before the function returns. The response payload returns the status of the operation along with the name of the table that was cleared.</p>

      <div className="dl params">
        <div className="dt">Parameters</div>

        <div className="dd">
          <table className="params">
            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">tableName</td>
              <td>Name of the table to be cleared, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must be an existing table. Empty string clears all available tables, though this behavior is be prevented by default via gpudb.conf parameter 'disable\_clear\_all'. The default value is ''. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">authorization</td>
              <td>No longer used. User can pass an empty string. The default value is ''. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">options</td>

              <td>
                Optional parameters.

                <ul>
                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#adea8b5fd768ea481c4324cedafc8ccc0">clear\_table\_no\_error\_if\_not\_exists</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#a19066cad9fd313d9af1c6e6b7abfaaf5">true</a> and if the table specified in <span className="em arg">tableName</span> does not exist no error is returned. If <a className="el" href="/content/api/cpp/namespacegpudb#a8ce33841713205619a147b0e16df489b">false</a> and if the table specified in <span className="em arg">tableName</span> does not exist then an error is returned. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a19066cad9fd313d9af1c6e6b7abfaaf5">clear\_table\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a8ce33841713205619a147b0e16df489b">clear\_table\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a8ce33841713205619a147b0e16df489b">clear\_table\_false</a>.
                  </li>
                </ul>

                The default value is an empty map.
              </td>
            </tr>

            <tr>
              <td className="paramdir">\[out]</td>
              <td className="paramname">response\_</td>
              <td><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">Response</a> object containing the results of the operation.</td>
            </tr>
          </table>
        </div>
      </div>

      <div className="dl section return">
        <div className="dt">Returns</div>
        <div className="dd"><a className="el" href="/content/api/cpp/structgpudb_1_1ClearTableResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
