> ## 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.

# clearTables

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

  <h2 className="memtitle"><span className="permalink"><a href="#a6ea34c34f63eb6781811eea53b2a7e33">◆ </a></span>clearTables() <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_1ClearTablesResponse">ClearTablesResponse</a> gpudb::GPUdb::clearTables </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ClearTablesRequest">ClearTablesRequest</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) tables in the database cluster. </p>
      <p>The operation is synchronous meaning that the tables will be cleared before the function returns. The response payload returns the status of the operation for each table requested.</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_1ClearTablesRequest">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_1ClearTablesResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="aa039ed76125cf6049542860f71f8a2fe" />

  <h2 className="memtitle"><span className="permalink"><a href="#aa039ed76125cf6049542860f71f8a2fe">◆ </a></span>clearTables() <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_1ClearTablesResponse">ClearTablesResponse</a> & gpudb::GPUdb::clearTables </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1ClearTablesRequest">ClearTablesRequest</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_1ClearTablesResponse">ClearTablesResponse</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) tables in the database cluster. </p>
      <p>The operation is synchronous meaning that the tables will be cleared before the function returns. The response payload returns the status of the operation for each table requested.</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_1ClearTablesRequest">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_1ClearTablesResponse">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_1ClearTablesResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="ad41cf27b402ded6a1b6876bfcd28770e" />

  <h2 className="memtitle"><span className="permalink"><a href="#ad41cf27b402ded6a1b6876bfcd28770e">◆ </a></span>clearTables() <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_1ClearTablesResponse">ClearTablesResponse</a> gpudb::GPUdb::clearTables </td>
          <td>(</td>
          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableNames</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) tables in the database cluster. </p>
      <p>The operation is synchronous meaning that the tables will be cleared before the function returns. The response payload returns the status of the operation for each table requested.</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">tableNames</td>
              <td>Names of the tables 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 existing tables. Empty list clears all available tables, though this behavior is be prevented by default via gpudb.conf parameter 'disable\_clear\_all'. The default value is an empty vector. </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#aad8bebea802c4d60f13cb20c11cdee46">clear\_tables\_no\_error\_if\_not\_exists</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#aeb4d938d6844d47c476c1e7f793b7603">true</a> and if a table specified in <span className="em arg">tableNames</span> does not exist no error is returned. If <a className="el" href="/content/api/cpp/namespacegpudb#a0820747ad294b1af92e267be2a7beae0">false</a> and if a table specified in <span className="em arg">tableNames</span> does not exist then an error is returned. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#aeb4d938d6844d47c476c1e7f793b7603">clear\_tables\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a0820747ad294b1af92e267be2a7beae0">clear\_tables\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a0820747ad294b1af92e267be2a7beae0">clear\_tables\_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_1ClearTablesResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="a2be613cf6005c367f6d4f2f9835f2d27" />

  <h2 className="memtitle"><span className="permalink"><a href="#a2be613cf6005c367f6d4f2f9835f2d27">◆ </a></span>clearTables() <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_1ClearTablesResponse">ClearTablesResponse</a> & gpudb::GPUdb::clearTables </td>
          <td>(</td>
          <td className="paramtype">const std::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">tableNames</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_1ClearTablesResponse">ClearTablesResponse</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) tables in the database cluster. </p>
      <p>The operation is synchronous meaning that the tables will be cleared before the function returns. The response payload returns the status of the operation for each table requested.</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">tableNames</td>
              <td>Names of the tables 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 existing tables. Empty list clears all available tables, though this behavior is be prevented by default via gpudb.conf parameter 'disable\_clear\_all'. The default value is an empty vector. </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#aad8bebea802c4d60f13cb20c11cdee46">clear\_tables\_no\_error\_if\_not\_exists</a>: If <a className="el" href="/content/api/cpp/namespacegpudb#aeb4d938d6844d47c476c1e7f793b7603">true</a> and if a table specified in <span className="em arg">tableNames</span> does not exist no error is returned. If <a className="el" href="/content/api/cpp/namespacegpudb#a0820747ad294b1af92e267be2a7beae0">false</a> and if a table specified in <span className="em arg">tableNames</span> does not exist then an error is returned. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#aeb4d938d6844d47c476c1e7f793b7603">clear\_tables\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a0820747ad294b1af92e267be2a7beae0">clear\_tables\_false</a> </li>
                    </ul>

                    The default value is <a className="el" href="/content/api/cpp/namespacegpudb#a0820747ad294b1af92e267be2a7beae0">clear\_tables\_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_1ClearTablesResponse">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_1ClearTablesResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>
</div>
