--- title: "Using Comments | Microsoft Docs" ms.custom: "" ms.date: "03/01/2017" ms.prod: "sql-server-2016" ms.reviewer: "" ms.suite: "" ms.technology: - "database-engine" ms.tgt_pltfrm: "" ms.topic: "article" applies_to: - "SQL Server 2016" ms.assetid: 0e9e6eab-0343-4840-9690-1736552ce371 caps.latest.revision: 28 author: "BYHAM" ms.author: "rickbyh" manager: "jhubbard" --- # Lesson 2-4 - Using Comments [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] allows you to easily comment out a portion of your script. ## Commenting Out Part of a Script #### To 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 (--). In addition to using the **Edit** menu, you can comment or uncomment a selected portion of your script by using either of the following methods: - Click the buttons on the SQL Editor toolbar. - Press CTRL+K and CTRL+C to comment the text, or press CTRL+K, CTRL+U to uncomment the text. ## Next Task in Lesson [Other Ways of Viewing the Code Window](../../tools/sql-server-management-studio/lesson-2-5-other-ways-of-viewing-the-code-window.md)