# DROP STORE

## Syntax <a href="#synopsis" id="synopsis"></a>

```sql
DROP STORE store_name;
```

## Description <a href="#description" id="description"></a>

Drops a [store](/overview/core-concepts/store.md) from the organization. Only the store owner can execute this command. Also, you cannot drop a store if there are any relations that depend on the store.

{% hint style="warning" %}
**Important** `DROP STORE` cannot be undone. Use it with care!
{% endhint %}

### Arguments

#### store\_name

The name of the store to drop. If the name is case-sensitive, you must wrap it in double quotes; otherwise, the system uses the lower case name.

## Examples <a href="#example" id="example"></a>

#### Drop the current store

The following drops the current store `demostore`, where the current store name is also reset. You can set a new store using the [USE](/reference/sql-syntax/command/use.md) command:

```sh
demodb.public/demostore# LIST STORES;
+------------+------------+----------------+------------+-------------+------------+-------------------------------+-------------------------------+
|  Name      |  Type      |  Access Region |  State     |  Is Default |  Owner     |  Created At                   |  Updated At                   |
+============+============+================+============+=============+============+===============================+===============================+
| demostore  | Kafka      | AWS us-east-1  | ready      | true        | sysadmin   | 2024-05-09 22:39:40 +0000 UTC | 2024-05-09 22:39:40 +0000 UTC |
+------------+------------+----------------+------------+-------------+------------+-------------------------------+-------------------------------+
demodb.public/demostore# DROP STORE demostore;
+------------+------------+------------+------------------------------------------+
|  Type      |  Name      |  Command   |  Summary                                 |
+============+============+============+==========================================+
| store      | demostore  | DROP       | store "demostore" has been marked for    |
|            |            |            | deletion                                 |
+------------+------------+------------+------------------------------------------+
demodb.public/<no-store>#
```

When you drop a default store for the current organization, you can set a new one with[SET DEFAULT](/reference/sql-syntax/command/set-default.md) to use for the succeeding sessions of the organization that owns the store.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.deltastream.io/reference/sql-syntax/ddl/drop-store.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
