Just like any programming language, Transact-SQL code can be read and modified more efficiently when formatted in a consistent manner. While there is no official Transact-SQL format or style recommendations, Mark Long has a few of his own to offer. Transact-SQL programmers with basic query skills and familiarity with SQL Server Management Studio will better understand the possibilities of formatting Transact-SQL code in an SSMS environment and will be capable of implementing their own structure.

Access in-depth Transact-SQL training with the Querying Data with Transact-SQL - Exam 70-761 Certification Training Course.


A 25-year veteran of the information technology field, Mark Long witnessed the birth and adoption of the Local Area Network. In 1996, equipped a long list of industry certifications, Mark launched his own consulting, development, and training company. Mark has tackled a wide range of technological challenges for sole-proprietor startups, Fortune 100 companies, the Texas State Legislature, U.S. Air Force, and companies in the entertainment industry.

Article image: Screen from "How should I format Transact-SQL queries?" (source: O'Reilly).