How should I format Transact-SQL queries?

Learn the formatting possibilities for Transact-SQL queries and develop your own code structure.

By Mark Long
February 22, 2017
Screen from "How should I format Transact-SQL queries?" Screen from "How should I format Transact-SQL queries?" (source: O'Reilly)

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.

Learn faster. Dig deeper. See farther.

Join the O'Reilly online learning platform. Get a free trial today and find answers on the fly, or master something new and useful.

Learn more

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.

Post topics: Software Engineering