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

# deleteRecords

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="deleteRecords(com.gpudb.protocol.DeleteRecordsRequest)">
        <h3>deleteRecords</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/DeleteRecordsResponse" title="class in com.gpudb.protocol">DeleteRecordsResponse</a></span> <span className="element-name">deleteRecords</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest" title="class in com.gpudb.protocol">DeleteRecordsRequest</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">Deletes record(s) matching the provided criteria from the given table. The record selection criteria can either be one or more <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest#getExpressions()"><code>expressions</code></a> (matching multiple records), a single record identified by <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#RECORD_ID"><code>RECORD\_ID</code></a> options, or all records when using <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#DELETE_ALL_RECORDS"><code>DELETE\_ALL\_RECORDS</code></a>. Note that the three selection criteria are mutually exclusive. This operation cannot be run on a view. The operation is synchronous meaning that a response will not be available until the request is completely processed and all the matching records are deleted.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest" 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/DeleteRecordsResponse" 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="deleteRecords(java.lang.String,java.util.List,java.util.Map)">
        <h3>deleteRecords</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/DeleteRecordsResponse" title="class in com.gpudb.protocol">DeleteRecordsResponse</a></span> <span className="element-name">deleteRecords</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/util/List.html" title="class or interface in java.util" className="external-link">List</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>> expressions, <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">Deletes record(s) matching the provided criteria from the given table. The record selection criteria can either be one or more <code> expressions</code> (matching multiple records), a single record identified by <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#RECORD_ID"><code>RECORD\_ID</code></a> options, or all records when using <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#DELETE_ALL_RECORDS"><code>DELETE\_ALL\_RECORDS</code></a>. Note that the three selection criteria are mutually exclusive. This operation cannot be run on a view. The operation is synchronous meaning that a response will not be available until the request is completely processed and all the matching records are deleted.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>tableName</code> - Name of the table from which to delete records, in \[schema\_name.]table\_name format, using standard <a href="/content/concepts/tables/#table-name-resolution" target="_top">name resolution rules</a>. Must contain the name of an existing table; not applicable to views.</div>
          <div className="dd"><code>expressions</code> - A list of the actual predicates, one for each select; format should follow the guidelines provided <a href="/content/concepts/expressions/" target="_top">here</a>. Specifying one or more <code>expressions</code> is mutually exclusive to specifying <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#RECORD_ID"><code>RECORD\_ID</code></a> in the <code>options</code>.</div>

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

            <ul>
              <li><a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#GLOBAL_EXPRESSION"><code>GLOBAL\_EXPRESSION</code></a>: An optional global expression to reduce the search space of the <code>expressions</code>. The default value is ''. </li>
              <li><a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#RECORD_ID"><code>RECORD\_ID</code></a>: A record ID identifying a single record, obtained at the time of <a href="#insertRecords(java.lang.String,java.util.List,java.util.Map)"><code>insertion of the record</code></a> or by calling <a href="#getRecordsFromCollection(java.lang.String,long,long,java.util.Map)"><code>getRecordsFromCollection</code></a> with the \*return\_record\_ids\* option. This option cannot be used to delete records from <a href="/content/concepts/tables/#replication" target="_top">replicated</a> tables. </li>

              <li>
                <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#DELETE_ALL_RECORDS"><code>DELETE\_ALL\_RECORDS</code></a>: If set to <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#TRUE"><code>TRUE</code></a>, all records in the table will be deleted. If set to <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.Options#FALSE"><code>FALSE</code></a>, then the option is effectively ignored. Supported values:

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

                The default value is <a href="/content/api/java/com/gpudb/protocol/DeleteRecordsRequest.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/DeleteRecordsResponse" 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>
