> ## 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-doxygen">
  <div id="a737a76b0c9fdd8d091dc6d02e9fcac78" />

  <h2 className="memtitle"><span className="permalink"><a href="#a737a76b0c9fdd8d091dc6d02e9fcac78">◆ </a></span>deleteRecords() <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_1DeleteRecordsResponse">DeleteRecordsResponse</a> gpudb::GPUdb::deleteRecords </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1DeleteRecordsRequest">DeleteRecordsRequest</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>Deletes record(s) matching the provided criteria from the given table. </p>
      <p>The record selection criteria can either be one or more <a className="el" href="/content/api/cpp/structgpudb_1_1DeleteRecordsRequest#a337a4aedda81f8ff2ceb4080cde1ea07">expressions</a> (matching multiple records), a single record identified by <a className="el" href="/content/api/cpp/namespacegpudb#ad42fcb5679c9c0432a46547e529eef7b">record\_id</a> options, or all records when using <a className="el" href="/content/api/cpp/namespacegpudb#a038cecdc7ab035a6642a3790f9ffa1a6">delete\_all\_records</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.</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_1DeleteRecordsRequest">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_1DeleteRecordsResponse">Response</a> object containing the result of the operation. </div>
      </div>
    </div>
  </div>

  <div id="af182254f80a9af09535b294c1ec135bb" />

  <h2 className="memtitle"><span className="permalink"><a href="#af182254f80a9af09535b294c1ec135bb">◆ </a></span>deleteRecords() <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_1DeleteRecordsResponse">DeleteRecordsResponse</a> & gpudb::GPUdb::deleteRecords </td>
          <td>(</td>
          <td className="paramtype">const <a className="el" href="/content/api/cpp/structgpudb_1_1DeleteRecordsRequest">DeleteRecordsRequest</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_1DeleteRecordsResponse">DeleteRecordsResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Deletes record(s) matching the provided criteria from the given table. </p>
      <p>The record selection criteria can either be one or more <a className="el" href="/content/api/cpp/structgpudb_1_1DeleteRecordsRequest#a337a4aedda81f8ff2ceb4080cde1ea07">expressions</a> (matching multiple records), a single record identified by <a className="el" href="/content/api/cpp/namespacegpudb#ad42fcb5679c9c0432a46547e529eef7b">record\_id</a> options, or all records when using <a className="el" href="/content/api/cpp/namespacegpudb#a038cecdc7ab035a6642a3790f9ffa1a6">delete\_all\_records</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.</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_1DeleteRecordsRequest">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_1DeleteRecordsResponse">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_1DeleteRecordsResponse">Response</a> object containing the result of the operation (initially passed in by reference). </div>
      </div>
    </div>
  </div>

  <div id="a8f916f1513778ef51cfb294659f452ae" />

  <h2 className="memtitle"><span className="permalink"><a href="#a8f916f1513778ef51cfb294659f452ae">◆ </a></span>deleteRecords() <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_1DeleteRecordsResponse">DeleteRecordsResponse</a> gpudb::GPUdb::deleteRecords </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::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">expressions</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>Deletes record(s) matching the provided criteria from the given table. </p>
      <p>The record selection criteria can either be one or more <span className="em arg">expressions</span> (matching multiple records), a single record identified by <a className="el" href="/content/api/cpp/namespacegpudb#ad42fcb5679c9c0432a46547e529eef7b">record\_id</a> options, or all records when using <a className="el" href="/content/api/cpp/namespacegpudb#a038cecdc7ab035a6642a3790f9ffa1a6">delete\_all\_records</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.</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 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. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">expressions</td>
              <td>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 <span className="em arg">expressions</span> is mutually exclusive to specifying <a className="el" href="/content/api/cpp/namespacegpudb#ad42fcb5679c9c0432a46547e529eef7b">record\_id</a> in the <span className="em arg">options</span>. </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#a3cb9ea12e7c065a082118bbe7bdf07b3">delete\_records\_global\_expression</a>: An optional global expression to reduce the search space of the <span className="em arg">expressions</span>. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad42fcb5679c9c0432a46547e529eef7b">delete\_records\_record\_id</a>: A record ID identifying a single record, obtained at the time of <a className="el" href="#a1cbbfefa7a3d6b4570f1be6734a8d849">insertion of the record</a> or by calling <a className="el" href="#ad07e8ca5da326049590fc62762c630a1">getRecordsFromCollection</a> with the <span className="em">return\_record\_ids</span> option. This option cannot be used to delete records from <a href="/content/concepts/tables/#replication" target="_top">replicated</a> tables. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a038cecdc7ab035a6642a3790f9ffa1a6">delete\_records\_delete\_all\_records</a>: If set to <a className="el" href="/content/api/cpp/namespacegpudb#a36d198ecdf41447d55b480f6cc34774e">true</a>, all records in the table will be deleted. If set to <a className="el" href="/content/api/cpp/namespacegpudb#aad2dc74761b7204b93fe896e7ae0f0fd">false</a>, then the option is effectively ignored. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a36d198ecdf41447d55b480f6cc34774e">delete\_records\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#aad2dc74761b7204b93fe896e7ae0f0fd">delete\_records\_false</a> </li>
                    </ul>

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

  <div id="a1ce474514d4e6ad6396ee5611d5dfebd" />

  <h2 className="memtitle"><span className="permalink"><a href="#a1ce474514d4e6ad6396ee5611d5dfebd">◆ </a></span>deleteRecords() <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_1DeleteRecordsResponse">DeleteRecordsResponse</a> & gpudb::GPUdb::deleteRecords </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::vector\< std::string > &</td>
          <td className="paramname"><span className="paramname"><span className="em">expressions</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_1DeleteRecordsResponse">DeleteRecordsResponse</a> &</td>
          <td className="paramname"><span className="paramname"><span className="em">response\_</span></span> ) const</td>
        </tr>
      </table>
    </div>

    <div className="memdoc">
      <p>Deletes record(s) matching the provided criteria from the given table. </p>
      <p>The record selection criteria can either be one or more <span className="em arg">expressions</span> (matching multiple records), a single record identified by <a className="el" href="/content/api/cpp/namespacegpudb#ad42fcb5679c9c0432a46547e529eef7b">record\_id</a> options, or all records when using <a className="el" href="/content/api/cpp/namespacegpudb#a038cecdc7ab035a6642a3790f9ffa1a6">delete\_all\_records</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.</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 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. </td>
            </tr>

            <tr>
              <td className="paramdir">\[in]</td>
              <td className="paramname">expressions</td>
              <td>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 <span className="em arg">expressions</span> is mutually exclusive to specifying <a className="el" href="/content/api/cpp/namespacegpudb#ad42fcb5679c9c0432a46547e529eef7b">record\_id</a> in the <span className="em arg">options</span>. </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#a3cb9ea12e7c065a082118bbe7bdf07b3">delete\_records\_global\_expression</a>: An optional global expression to reduce the search space of the <span className="em arg">expressions</span>. The default value is ''. </li>
                  <li> <a className="el" href="/content/api/cpp/namespacegpudb#ad42fcb5679c9c0432a46547e529eef7b">delete\_records\_record\_id</a>: A record ID identifying a single record, obtained at the time of <a className="el" href="#a1cbbfefa7a3d6b4570f1be6734a8d849">insertion of the record</a> or by calling <a className="el" href="#ad07e8ca5da326049590fc62762c630a1">getRecordsFromCollection</a> with the <span className="em">return\_record\_ids</span> option. This option cannot be used to delete records from <a href="/content/concepts/tables/#replication" target="_top">replicated</a> tables. </li>

                  <li>
                    <a className="el" href="/content/api/cpp/namespacegpudb#a038cecdc7ab035a6642a3790f9ffa1a6">delete\_records\_delete\_all\_records</a>: If set to <a className="el" href="/content/api/cpp/namespacegpudb#a36d198ecdf41447d55b480f6cc34774e">true</a>, all records in the table will be deleted. If set to <a className="el" href="/content/api/cpp/namespacegpudb#aad2dc74761b7204b93fe896e7ae0f0fd">false</a>, then the option is effectively ignored. Supported values:

                    <ul>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#a36d198ecdf41447d55b480f6cc34774e">delete\_records\_true</a> </li>
                      <li> <a className="el" href="/content/api/cpp/namespacegpudb#aad2dc74761b7204b93fe896e7ae0f0fd">delete\_records\_false</a> </li>
                    </ul>

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