Add a comment in KQL
Learn how to add comments in Kusto Query Language.
Indicates user-provided text. Comments can be inserted on a separate line, nested at the end, or within a KQL query or command. The comment text isn’t evaluated.
Syntax
//
comment
Remarks
Use the two slashes (//) to add comments. The following table lists the keyboard shortcuts that you can use to comment or uncomment text.
Hot Key | Description |
---|---|
Ctrl +K +C | Comment current line or selected lines. |
Ctrl +K +U | Uncomment current line or selected lines. |
Example
This example returns a count of events in the New York state:
// Return the count of events in the New York state from the StormEvents table
StormEvents
| where State == "NEW YORK" // Filter the records where the State is "NEW YORK"
| count
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.