DROP STORE

Syntax

DROP STORE store_name;

Description

Drops a store 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.

Important DROP STORE cannot be undone. Use it with care!

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

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 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 you drop a default store for the current organization, you can set a new one withSET DEFAULT to use for the succeeding sessions of the organization that owns the store.

Last updated