Thursday, July 1, 2021

Column width in the sqlplus output

The queries might include char typed columns in the output. The output of these columns can be extended by sqlplus when multi-byte character set was set in the environment (NLS_LANG variable). Of course choosing NLS_LANG value should not be determined by the cosmetic effects of the output only; there are more important things like character set of input files, operating system output handling etc. All that I wanted to say - just know that "detail".

There are examples :

1. NLS_LANG=.al32utf8

SQL> r
 1* select 'status' from dual

'STATUS'
------------------
status

2. NLS_LANG was unset (then us7ascii character set is used) or set to single-byte character set

SQL> select 'status' from dual ;

'STATU
------
status

Good Luck !