This documentation is archived and is not being maintained.

Using Comments

SQL Server Management Studio allows you to easily comment out a portion of your script.

  1. Use your mouse to select the text WHERE LastName = 'Sanchez'.

  2. On the Edit menu, point to Advanced, and then click Comment Selection. The selected text is commented out with dashes (--).

ms167042.note(en-US,SQL.90).gifNote:
You can also use buttons on the SQL Editor toolbar to comment and uncomment text.

Show: