SQL Flow Field Guide

:Out

Check your sqlcmd client variant and platform

Choose the destination for query results.

Syntax at a glance

:Out filename | STDERR | STDOUT

Work example

Save a small reconciliation result

Pick a fresh file in a lab directory, enter :Out with that path, and run a short SELECT. Return output to STDOUT afterward.

Check your work The file contains the SELECT result and later output returns to the terminal.

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