SQL Flow Field Guide

Backslash (Line Continuation)

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

line continuation inside string/binary literals (lexical)

What changes

Input
none
Output or change
none

Syntax at a glance

<first section of string> \ <continued section of string>

Work example

A command-line script uses a continuation marker that must be read by its client tool.

Check the client documentation and keep the marker out of SQL sent directly to the database engine.

Check your work Backslash (Line Continuation). The utility joins the intended lines and SQL Server receives valid T-SQL batches.

Open Microsoft Learn for full syntax, permissions, and details for your version.