Altova DatabaseSpy 2025 Professional Edition

Commenting Out Text

Home Prev Top Next

In the SQL Editor it is possible to comment out statements, parts of statements, or groups of statements. These statements, or the respective parts of them, will be skipped when the SQL script is being executed.

To comment out a section of text:

1.Select a statement or part of a statement.

sql_ed_selected_text

2.Click the Comment/Uncomment selected block ic_ins-remove-block-comment button in the SQL Script toolbar or select Insert | Insert/Remove Block Comment from the SQL Editor menu. The statement is commented out.

To comment out text line by line:

1.Put the cursor in a statement at the point from which you want to comment it out.

sql_ed_cursor

2.Click the Comment/Uncomment selected lines ic_ins-remove-line-comment button in the SQL Script toolbar or select Insert | Insert/Remove Line Comment from the SQL Editor menu. The statement is commented out from the current position of the cursor to the end of the line.

To remove a block comment or a line comment:

1.Select the part of the statement that is commented out. If you want to remove a line comment, it is sufficient to select only the comment marks -- before the comment.

2.Do one of the following:

 

Click the Comment/Uncomment selected block ic_ins-remove-block-comment button in the SQL Script toolbar or select Insert | Insert/Remove Block Comment from the SQL Editor menu.

Click the Comment/Uncomment selected lines ic_ins-remove-line-comment button in the SQL Script toolbar or select Insert | Insert/Remove Line Comment from the SQL Editor menu.

© 2018-2024 Altova GmbH