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

# delete_records

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/delete_records.rs#L33-L44)
pub async fn [delete\_records](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/delete-records.md#method.delete_records)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), expressions: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DeleteRecordsResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DeleteRecordsResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Delete matching records from a datasetDeletes record(s) matching the provided criteria from the given table. The record selection criteria can either be one or more `expressions` (matching multiple records), a single record identified by record\_id options, or all records when using delete\_all\_records. 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.

##### Arguments

<ul>
  <li>`table_name` - Name of the table from which to delete records, in \[schema\_name.]table\_name format, using standard name resolution rules. Must contain the name of an existing table; not applicable to views.</li>
  <li>`expressions` - A list of the actual predicates, one for each select; format should follow the guidelines provided here. Specifying one or more `expressions` is mutually exclusive to specifying record\_id in the `options`.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/delete_records.rs#L69-L87)
pub async fn [delete\_records\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/delete-records.md#method.delete_records_with_opts)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), expressions: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, options: [DeleteRecordsRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.DeleteRecordsRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DeleteRecordsResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DeleteRecordsResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Delete matching records from a datasetDeletes record(s) matching the provided criteria from the given table. The record selection criteria can either be one or more `expressions` (matching multiple records), a single record identified by record\_id options, or all records when using delete\_all\_records. 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.

##### Arguments

<ul>
  <li>`table_name` - Name of the table from which to delete records, in \[schema\_name.]table\_name format, using standard name resolution rules. Must contain the name of an existing table; not applicable to views.</li>
  <li>`expressions` - A list of the actual predicates, one for each select; format should follow the guidelines provided here. Specifying one or more `expressions` is mutually exclusive to specifying record\_id in the `options`.</li>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/delete_records.rs#L90-L101)
pub async fn [delete\_records\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/delete-records.md#method.delete_records_raw)( \&self, request: &[DeleteRecordsRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.DeleteRecordsRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DeleteRecordsResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DeleteRecordsResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`DeleteRecordsRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.DeleteRecordsRequest) to the `/delete/records` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/delete_records.rs#L105-L117)
pub async fn [delete\_records\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/delete-records.md#method.delete_records_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[DeleteRecordsRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.DeleteRecordsRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[DeleteRecordsResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.DeleteRecordsResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`DeleteRecordsRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.DeleteRecordsRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.