:QUIT
Exit the sqlcmd client.
Syntax at a glance
:QUIT
Work example
Close a completed lab session
Run a small batch with GO and review its results. Enter :QUIT when you have finished.
Check your work The client returns control to the shell.
Open Microsoft Learn for full syntax, permissions, and details for your version.