I have installed SQL Server 2017 on RHEL Linux 7.3, and using SQLCMD utility for querying the SQL Server.
When I try to query for example: 'SELECT * FROM SYS.DATABASES'. I get output like the following:
How to format the output for SQL commands on SQLCMD for SQL Server on RHEL Linux?
For example, in Oracle we use 'SET LINES 200 PAGES 200' to format the output / width of the output columns.
Note: I have already tried the following workaround (as per other answer on dba.stackexchange):
C:/> sqlcmd -S my_server :setvar SQLCMDMAXVARTYPEWIDTH 30 :setvar SQLCMDMAXFIXEDTYPEWIDTH 30 SELECT * from my_table GO