User Guide > Views and Table Resources > Commenting SQL
 
Commenting SQL
You can insert standard SQL comments by starting each line with a pair of hyphens. You can also insert multiple-line C-style comments, using /* to start the comment and */ to end the comment. Each of these methods is described below.
To insert standard SQL comments
1. Use one of these methods:
In the SQL panel, type two hyphens at the beginning of each line you want to be a comment line.
Select the lines you want to comment and type Ctrl-Hyphen, which adds two hyphens to the start of each line.
You can type Ctrl-Hyphen again to remove the hyphens.
Select the lines you want to comment, and choose Edit > Comment Block.
You can type Edit > Comment Block again to remove the hyphens.
Note: If the selected block contains some lines that are already commented, another pair of hyphens is added at the beginning of the lines.
Although comments are stripped from the SQL request at runtime, a TDV configuration setting can cause comments to be passed through to the data sources so that client metadata can be recorded at the source. For details, see SQL Request Annotation Pass-Through.
To insert C-style comments
1. In the SQL statement, type /* to start the comment and */ to end the comment.