# DROP SCHEMA\_REGISTRY

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

```sql
DROP SCHEMA_REGISTRY schema_registry_name;
```

### Description

Drops a [schema registry](/overview/core-concepts/store.md#schema-registry) from the organization. You cannot drop a schema registry if there exist any stores that depend on that schema registry.

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

### Arguments

#### schema\_registry\_name

Specifies the name of the schema registry. If the name is case-sensitive, you must wrap it in double quotes; otherwise, the system uses the lower case name.

## Examples

#### Drop a schema registry

Drops the schema registry named `ccsr`:

```sh
demodb.public/demostore# LIST SCHEMA_REGISTRIES;
+---------------------+------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------+
|  Name               |  Type      |  State     |  Uris                                    |  Owner     |  Created At                   |  Updated At                   |
+=====================+============+============+==========================================+============+===============================+===============================+
| ConfluentPlatformSR | Confluent  | ready      | https://url.to.schema.registry.listener: | sysadmin   | 2024-07-03 14:49:13 +0000 UTC | 2024-07-03 14:49:13 +0000 UTC |
|                     |            |            | 8081                                     |            |                               |                               |
+---------------------+------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------+
| ccsr                | Confluent  | ready      | https://path-to-my-registry              | sysadmin   | 2024-07-03 15:42:20 +0000 UTC | 2024-07-03 15:42:20 +0000 UTC |
+---------------------+------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------++-------------------------------+-------------------------------+
demodb.public/demostore# DROP SCHEMA_REGISTRY ccsr;
+-----------------+------------+------------+------------------------------------------+
|  Type           |  Name      |  Command   |  Summary                                 |
+=================+============+============+==========================================+
| schema registry | ccsr       | DROP       | schema registry "ccsr" has been marked   |
|                 |            |            | for deletion                             |
+-----------------+------------+------------+------------------------------------------+
demodb.public/demostore# LIST SCHEMA_REGISTRIES;
+---------------------+------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------+
|  Name               |  Type      |  State     |  Uris                                    |  Owner     |  Created At                   |  Updated At                   |
+=====================+============+============+==========================================+============+===============================+===============================+
| ConfluentPlatformSR | Confluent  | ready      | https://url.to.schema.registry.listener: | sysadmin   | 2024-07-03 14:49:13 +0000 UTC | 2024-07-03 14:49:13 +0000 UTC |
|                     |            |            | 8081                                     |            |                               |                               |
+---------------------+------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------+
```

#### Drop a schema registry with a case-sensitive name

Drops the schema registry named `ConfluentCloudSR`:

```sh
demodb.public/demostore# LIST SCHEMA_REGISTRIES;
+---------------------+----------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------+
|  Name               |  Type          |  State     |  Uris                                    |  Owner     |  Created At                   |  Updated At                   |
+=====================+================+============+==========================================+============+===============================+===============================+
| ConfluentPlatformSR | Confluent      | ready      | https://url.to.schema.registry.listener: | sysadmin   | 2024-07-03 14:49:13 +0000 UTC | 2024-07-03 14:49:13 +0000 UTC |
|                     |                |            | 8081                                     |            |                               |                               |
+---------------------+----------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------+
| ConfluentCloudSR    | ConfluentCloud | ready      | https://abcd-efghi.us-east-2.aws.conflue | sysadmin   | 2024-07-03 14:37:03 +0000 UTC | 2024-07-03 14:37:03 +0000 UTC |
|                     |                |            | nt.cloud                                 |            |                               |                               |
+---------------------+----------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------+
demodb.public/demostore# DROP SCHEMA_REGISTRY "ConfluentCloudSR";
+-----------------+------------------+------------+------------------------------------------+
|  Type           |  Name            |  Command   |  Summary                                 |
+=================+==================+============+==========================================+
| schema registry | ConfluentCloudSR | DROP       | schema registry "ConfluentCloudSR" has   |
|                 |                  |            | been marked for deletion                 |
+-----------------+------------------+------------+------------------------------------------+
demodb.public/demostore# LIST SCHEMA_REGISTRIES;
+---------------------+------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------+
|  Name               |  Type      |  State     |  Uris                                    |  Owner     |  Created At                   |  Updated At                   |
+=====================+============+============+==========================================+============+===============================+===============================+
| ConfluentPlatformSR | Confluent  | ready      | https://url.to.schema.registry.listener: | sysadmin   | 2024-07-03 14:49:13 +0000 UTC | 2024-07-03 14:49:13 +0000 UTC |
|                     |            |            | 8081                                     |            |                               |                               |
+---------------------+------------+------------+------------------------------------------+------------+-------------------------------+-------------------------------+
```


---

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