> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-3a82795f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Documentation for ALTER DATABASE ... MODIFY COMMENT statements which allow adding, modifying, or removing database comments.

# ALTER DATABASE ... MODIFY COMMENT Statements

Adds, modifies, or removes a database comment, regardless of whether it was set
before or not. The comment change is reflected in both [`system.databases`](/reference/system-tables/databases)
and the `SHOW CREATE DATABASE` query.

<h2 id="syntax">
  Syntax
</h2>

```sql theme={null}
ALTER DATABASE [db].name [ON CLUSTER cluster] MODIFY COMMENT 'Comment'
```

<h2 id="examples">
  Examples
</h2>

To create a `DATABASE` with a comment:

```sql title="Query" theme={null}
CREATE DATABASE database_with_comment ENGINE = Memory COMMENT 'The temporary database';
```

To modify the comment:

```sql title="Query" theme={null}
ALTER DATABASE database_with_comment 
MODIFY COMMENT 'new comment on a database';
```

To view the modified comment:

```sql title="Query" theme={null}
SELECT comment 
FROM system.databases 
WHERE name = 'database_with_comment';
```

```text title="Response" theme={null}
┌─comment─────────────────┐
│ new comment on database │
└─────────────────────────┘
```

To remove the database comment:

```sql title="Query" theme={null}
ALTER DATABASE database_with_comment 
MODIFY COMMENT '';
```

To verify that the comment was removed:

```sql title="Query" theme={null}
SELECT comment 
FROM system.databases 
WHERE  name = 'database_with_comment';
```

```text title="Response" theme={null}
┌─comment─┐
│         │
└─────────┘
```

<h2 id="related-content">
  Related content
</h2>

* [`COMMENT`](/reference/statements/create/table#comment-clause) clause
* [`ALTER TABLE ... MODIFY COMMENT`](/reference/statements/alter/comment)
