I am using below command line to run a SQL query using SQLCMD
sqlcmd -S Server -Q \"select top 100 * From people\" -d people -t 10
The table h
Formatting issues usually pop up due to your console window. One solution is to output to the file and use notepad/your favorite editor:
sqlcmd -S myServer -d myDB -E -Q "select top 100 * From people" -o "output.txt"