> ## 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-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="clearTable(com.gpudb.protocol.ClearTableRequest)">
        <h3>clearTable</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/ClearTableResponse" title="class in com.gpudb.protocol">ClearTableResponse</a></span> <span className="element-name">clearTable</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/ClearTableRequest" title="class in com.gpudb.protocol">ClearTableRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Clears (drops) one or all tables in the database cluster. 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.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/ClearTableRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/ClearTableResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>

    <li>
      <div className="section detail" id="clearTable(java.lang.String,java.lang.String,java.util.Map)">
        <h3>clearTable</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/ClearTableResponse" title="class in com.gpudb.protocol">ClearTableResponse</a></span> <span className="element-name">clearTable</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> tableName, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a> authorization, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> options)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Clears (drops) one or all tables in the database cluster. 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.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>tableName</code> - 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 ''.</div>
          <div className="dd"><code>authorization</code> - No longer used. User can pass an empty string. The default value is ''.</div>

          <div className="dd">
            <code>options</code> - Optional parameters.

            <ul>
              <li>
                <a href="/content/api/java/com/gpudb/protocol/ClearTableRequest.Options#NO_ERROR_IF_NOT_EXISTS"><code>NO\_ERROR\_IF\_NOT\_EXISTS</code></a>: If <a href="/content/api/java/com/gpudb/protocol/ClearTableRequest.Options#TRUE"><code>TRUE</code></a> and if the table specified in <code> tableName</code> does not exist no error is returned. If <a href="/content/api/java/com/gpudb/protocol/ClearTableRequest.Options#FALSE"><code>FALSE</code></a> and if the table specified in <code> tableName</code> does not exist then an error is returned. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/ClearTableRequest.Options#TRUE"><code>TRUE</code></a> </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/ClearTableRequest.Options#FALSE"><code>FALSE</code></a> </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/ClearTableRequest.Options#FALSE"><code>FALSE</code></a>.
              </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/ClearTableResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
