DROP STORE

Syntax

DROP STORE store_name;

Description

Drops a Store from the organization. It can only be executed by the Store owner. A Store cannot be dropped if there are any relations that depend on the Store.

DROP STORE cannot be undone. Use it with care!

Arguments

store_name

The name of the Store to drop. For case-sensitive names, the name must be wrapped in double quotes, otherwise, the lowercased name will be used.

Examples

Drop the current Store

The following drops the current Store demostore, where the current Store name is also reset. A new Store can be set using the USE command:

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 dropping a default Store for the current Orgianization, a new one can be set using SET DEFAULT to use for the following sessions of the Organization that owns the Store.

Last updated