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

# clear_table

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/clear_table.rs#L27-L38)
pub async fn [clear\_table](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/clear-table.md#method.clear_table)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), authorization: [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)\<[ClearTableResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.ClearTableResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Delete a tableClears (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.

##### Arguments

<ul>
  <li>`table_name` - Name of the table to be cleared, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing table. Empty string clears all available tables, though this behavior is prevented by default via system configuration parameter disable\_clear\_all.</li>
  <li>`authorization` - No longer used. User can pass an empty string.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/clear_table.rs#L57-L75)
pub async fn [clear\_table\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/clear-table.md#method.clear_table_with_opts)( \&self, table\_name: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), authorization: [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), options: [ClearTableRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.ClearTableRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[ClearTableResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.ClearTableResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Delete a tableClears (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.

##### Arguments

<ul>
  <li>`table_name` - Name of the table to be cleared, in \[schema\_name.]table\_name format, using standard name resolution rules. Must be an existing table. Empty string clears all available tables, though this behavior is prevented by default via system configuration parameter disable\_clear\_all.</li>
  <li>`authorization` - No longer used. User can pass an empty string.</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/clear_table.rs#L78-L89)
pub async fn [clear\_table\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/clear-table.md#method.clear_table_raw)( \&self, request: &[ClearTableRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ClearTableRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[ClearTableResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.ClearTableResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

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

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/clear_table.rs#L93-L105)
pub async fn [clear\_table\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/clear-table.md#method.clear_table_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[ClearTableRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.ClearTableRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[ClearTableResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.ClearTableResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`ClearTableRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.ClearTableRequest) 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.