# Comment Support

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: Comment Support
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/comment-support
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/comment-support.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/comment-support.adoc
description: Redpanda SQL fully supports comments in your queries.
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/comment-support.md -->

Redpanda SQL fully supports comments in your queries. Comments provide a way to add explanatory notes and improve the readability of queries, making it easier for developers and stakeholders to understand complex queries.

There are two types of comments in Redpanda SQL: single-line and multi-line (block).

## [](#single-line-comments)Single line comments

A single-line comment in Redpanda SQL starts with two consecutive hyphens (--) and extends to the end of the line. Use these comments to annotate specific parts of a query with brief explanations or notes that help readers understand the query.

### [](#syntax)Syntax

```sql
-- This is an example single line comment
```

## [](#multi-line-block-comments)Multi-line (block) comments

Redpanda SQL also supports multi-line comments, often referred to as block comments. These comments begin with `/` **and end with** `/`, allowing for multi-line explanations or temporarily disabling sections of the query.

### [](#syntax-2)Syntax

```sql
/*
This is an example multi-line comment.
It can span multiple lines and is useful for providing detailed explanations.
*/
```

## [](#comment-placement)Comment placement

In Redpanda SQL, single-line comments should always be placed at the end of the line they refer to, whereas multi-line comments can be positioned anywhere within the query.

### [](#comment-on-a-single-line)Comment on a single line

```sql
SELECT column1, column2 -- This is an example single line comment
FROM default_redpanda_catalog=>table_name;
```

### [](#comment-on-multiple-lines)Comment on multiple lines

```sql
SELECT /* comment 1 */ column1, column2
FROM default_redpanda_catalog=>table_name /* comment 2 */
WHERE column3 = 42 /* comment 3 */ ;
```

## [](#best-practices-for-commenting)Best practices for commenting

To maximize the benefits of comments in Redpanda SQL queries, follow these best practices:

-   Be concise. Write clear and concise comments that provide meaningful insights into the specific parts of the query.

-   Update comments during code changes. Whenever the query is modified, update the associated comments to reflect the changes accurately.

-   Avoid over-commenting. While comments are helpful, excessive commenting can clutter the code and reduce readability.