# DROP CHANGELOG

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

```sql
DROP CHANGELOG changelog_name;
```

## Description

Drops an existing [changelog](/overview/core-concepts/databases.md#_changelog). Only the changelog owner can execute it.

{% hint style="info" %}
**Notes**

* Deleting the changelog does not delete the entity underlying the changelog.
* You cannot drop a changelog if there exist any references to that changelog
  {% endhint %}

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

### Arguments

#### changelog\_name

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

## Example

#### Drop a Changelog using default database and schema

The following shows how to drop the changelog named `users_log`:

```sh
demodb.public/demostore# LIST CHANGELOGS;
+------------+------------+------------+------------+------------------------------------------+-------------------------------+-------------------------------+
|  Name      |  Type      |  Owner     |  State     |  Properties                              |  Created At                   |  Updated At                   |
+============+============+============+============+==========================================+===============================+===============================+
| users      | changelog  | sysadmin   | created    | { "value.format": "json", "topic":       | 2024-07-02 21:42:03 +0000 UTC | 2024-07-02 21:42:05 +0000 UTC |
|            |            |            |            | "users", "store": "demostore",           |                               |                               |
|            |            |            |            | "primary.key": "userid" }                |                               |                               |
+------------+------------+------------+------------+------------------------------------------+-------------------------------+-------------------------------+

demodb.public/demostore# DROP CHANGELOG "users";
+------------+---------------------+------------+------------------------------------------+
|  Type      |  Name               |  Command   |  Summary                                 |
+============+=====================+============+==========================================+
| query      | demodb.public.users | DROP       | relation demodb.public.users was dropped |
+------------+---------------------+------------+------------------------------------------+
demodb.public/demostore# LIST CHANGELOGS;
+------------+------------+------------+------------+-------------+-------------+-------------+
|  Name      |  Type      |  Owner     |  State     |  Properties |  Created At |  Updated At |
+============+============+============+============+=============+=============+=============+
+------------+------------+------------+------------+-------------+-------------+-------------+
```

#### Drop a changelog using fully-qualified name

The following shows how to drop the changelog named `UsersLog` in the database `otherdb` and schema `S1`:

```sh
demodb.public/demostore# LIST CHANGELOGS IN SCHEMA otherdb."S1";
+------------+------------+------------+------------+------------------------------------------+-------------------------------+-------------------------------+
|  Name      |  Type      |  Owner     |  State     |  Properties                              |  Created At                   |  Updated At                   |
+============+============+============+============+==========================================+===============================+===============================+
| UsersLog   | changelog  | sysadmin   | created    | { "value.format": "json", "topic":       | 2024-07-02 21:46:40 +0000 UTC | 2024-07-02 21:46:41 +0000 UTC |
|            |            |            |            | "users", "store": "demostore",           |                               |                               |
|            |            |            |            | "primary.key": "userid" }                |                               |                               |
+------------+------------+------------+------------+------------------------------------------+-------------------------------+-------------------------------+
demodb.public/demostore# DROP CHANGELOG otherdb."S1"."UsersLog";
+------------+---------------------+------------+------------------------------------------+
|  Type      |  Name               |  Command   |  Summary                                 |
+============+=====================+============+==========================================+
| query      | otherdb.S1.UsersLog | DROP       | relation otherdb.S1.UsersLog was dropped |
+------------+---------------------+------------+------------------------------------------+
demodb.public/demostore# LIST CHANGELOGS IN SCHEMA otherdb."S1";
+------------+------------+------------+------------+-------------+-------------+-------------+
|  Name      |  Type      |  Owner     |  State     |  Properties |  Created At |  Updated At |
+============+============+============+============+=============+=============+=============+
+------------+------------+------------+------------+-------------+-------------+-------------+
```


---

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