I need to get both the full text of an actual execution plan and my full table of results with column names from sqlcmd. My first requirement forces to me pass in -y 0
as documented here. However, this appears to disable column names appearing in my table’s output. I cannot find any reference to this in the documentation. So how can I both pass in -y 0
and get column names?
Alternatives to sqlcmd are not an option. I’m using sqlcmd because, as far as I can tell, Emacs demands that I must and Emacs is the only IDE that I know of for Microsoft SQL Server on Linux. My version is
~$: sqlcmd -?
Microsoft (R) SQL Server Command Line Tool
Version 18.2.0001.1 Linux
Copyright (C) 2017 Microsoft Corporation. All rights reserved.