---
title: Add comments to data and AI assets
description: Learn how to add comments to Databricks securable objects to assist with data discoverability.
canonical_url: https://docs.databricks.com/aws/en/comments/
---

# Add comments to data and AI assets

This article introduces comments for data and AI assets and explains how to add them. Comments can help you and other users find and manage the data and AI assets you need.

Comments provide a metadata field for annotating your securable objects. You can add comments to any securable object in Unity Catalog, such as catalogs, schemas, tables, volumes, AI models, and more. You can also add comments to table columns.

After adding comments to a securable object, any user with `BROWSE` privileges can view the comments. This improves data discoverability across your catalog.

You can add comments manually, or you can let Databricks create AI-generated comments for you. AI-generated comments (also known as AI-generated documentation) are available for tables and table columns. See [Add AI-generated comments to Unity Catalog objects](https://docs.databricks.com/aws/en/comments/ai-comments.md).

For richer, collaborative documentation on a table, create a wiki (Beta). See [Unity Catalog wikis](https://docs.databricks.com/aws/en/uc-semantics/wikis.md).

When you modify comments for a Unity Catalog table (or a Delta Lake table in the legacy Hive metastore), a `SET TBLPROPERTIES` operation in the table history records the SQL query that was used to define the table comment.

## Requirements

You must meet the following requirements in order to add or edit comments:

* To add or edit comments on a catalog, schema, volume, model, share, recipient, provider, storage credential, external location, or connection, you must be the owner of the object or have the `MANAGE` privilege on the object.
* To add or edit comments on a table or column, you must be the owner or have the following privileges:
  * `MODIFY` and `SELECT` on the table.
  * `USE CATALOG` and `USE SCHEMA` on the parent catalog and schema.
* To add or edit comments on a view or materialized view, you must be the owner of the view. Having the `MANAGE` privilege is insufficient.
* You must use a SQL warehouse or other compute that supports Unity Catalog.
* To use AI-generated comments, your workspace must be enabled for AI-assistive features. See [Add AI-generated comments to Unity Catalog objects](https://docs.databricks.com/aws/en/comments/ai-comments.md).

## Add and edit comments

You can add comments to securable objects or edit them using SQL commands or Catalog Explorer.

### Catalog Explorer

> [!IMPORTANT]
>
> Saving comments triggers an `ALTER` SQL command, which can disrupt Databricks pipelines and jobs.

1. In the workspace sidebar, click ![Data icon.](https://docs.databricks.com/aws/en/images/product-icons/DataIcon.svg) **Catalog** to open Catalog Explorer.

2. Search for and select the object you want to comment on.

   Data and AI objects are listed and searchable in the **Catalog** pane. Shares, storage credentials, external locations, and connections are accessible using the menu that opens when you click the ![Gear icon.](https://docs.databricks.com/aws/en/images/product-icons/GearIcon.svg) gear icon.

3. Add a comment or edit an existing comment.
   * **To add a comment to a table using AI-generated comments**, view the **AI Suggested Comment** in the right pane of the **Overview** tab. It might take a few seconds to appear. Either **Accept** it as-is or **Edit** and save it.
   * **To add a comment to a table column using AI-generated comments**, click the **AI generate** button above the column list. Databricks generates comments for each column. Accept them as-is or edit them. Click the check mark to save the comment.
   * **To add a comment to an object that doesn't support AI-generated comments**, click **Add comment** to add a comment.
   * **To add a comment to a table column without using AI-generated comments**, click the ![Icon to add a column tag or comment](https://docs.databricks.com/aws/en/images/icons/add-tag-comment-icon.png) **Add comment** icon in the column row.
   * **If a comment already exists**, it appears in the right pane on the **Overview** tab or below the object name. If it is not AI-generated, click the ![Edit icon](https://docs.databricks.com/aws/en/images/icons/pencil-edit-icon.png) edit icon to edit it.

You can use basic Markdown to style comments in the Catalog Explorer UI. Markdown styling does not render when returned by `DESCRIBE` statements. All basic syntax is supported in Catalog Explorer, except images. For more information, see [Basic Syntax](https://www.markdownguide.org/cheat-sheet/#basic-syntax).

For more information about AI-generated comments, see [Add AI-generated comments to Unity Catalog objects](https://docs.databricks.com/aws/en/comments/ai-comments.md).

### SQL

You can use a SQL command to add a string literal as a comment to any securable object in Unity Catalog and to tables managed in the legacy Hive metastore. The SQL command you use depends on the object you want to add or edit the comment for:

* To add or update a comment for any existing securable object except table columns, use the `COMMENT ON` command. See [COMMENT ON](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-comment.md).

  You can also use the `COMMENT` option with the `ALTER <object>` command for the object (for example, `ALTER TABLE`). See the SQL reference article for the `ALTER <object>` command.

* To add or update a column comment for an existing table, use the `ALTER TABLE` command with the `ALTER COLUMN` clause and the `COMMENT` option on the column. See [ALTER TABLE](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-alter-table.md) and [ALTER TABLE ... COLUMN clause](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-syntax-ddl-alter-table-manage-column.md).

* To add a comment when you create an object, use the `COMMENT` option with the `CREATE <object>` command. See the SQL reference article for the `CREATE <object>` command that you want to use.
