SQL Flow Field Guide

:ED

Check your sqlcmd client variant and platform

Open the batch in the configured Windows editor.

Syntax at a glance

:ED

Work example

Edit a batch that needs more than one line

In a Windows lab session, set SQLCMDEDITOR to your editor and enter :ED after typing the beginning of a SELECT. Save the batch and return to sqlcmd.

Check your work Use :List to review the revised buffer before GO. Check platform support in the source.

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