--- title: "Lesson 2: Writing Transact-SQL | Microsoft Docs" ms.custom: "" ms.date: "03/14/2017" ms.prod: "sql-server-2016" ms.reviewer: "" ms.suite: "" ms.technology: - "database-engine" ms.tgt_pltfrm: "" ms.topic: "article" ms.assetid: 439cfab5-c049-43a8-8617-59eaa8d24873 caps.latest.revision: 31 author: "BYHAM" ms.author: "rickbyh" manager: "jhubbard" --- # Lesson 2: Writing Transact-SQL [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] is an integrated development environment for writing [!INCLUDE[tsql](../../includes/tsql-md.md)], MDX, DMX, and XML queries, and SQLCMD commands. The tutorial illustrates using the Database Engine Query Editor to write a [!INCLUDE[tsql](../../includes/tsql-md.md)] script. >**PLEASE NOTE!!** This lesson focuses on using SSMS while working with T-SQL statements, **not on how to write T-SQL statements!** For a tutorial on writing [!INCLUDE[tsql](../../includes/tsql-md.md)] statements, see [Tutorial: Writing Transact-SQL Statements](../../t-sql/tutorial-writing-transact-sql-statements.md). This lesson covers the following topics: - [Connecting with Query Editor](https://msdn.microsoft.com/library/ms166753.aspx) - [Adding Indentation](https://msdn.microsoft.com/library/ms170169.aspx) - [Maximizing Query Editor](https://msdn.microsoft.com/library/ms166574.aspx) - [Using Comments](https://msdn.microsoft.com/library/ms167042.aspx) - [Using Multiple Code Windows](https://msdn.microsoft.com/library/ms170692.aspx) - [Script options](https://msdn.microsoft.com/library/ms169684.aspx) ## Next Task in Lesson [Connecting with Query Editor](../../tools/sql-server-management-studio/lesson-2-1-connecting-with-query-editor.md)