Varchar2 and Oracle quick question
3 answers
If TRIM
does not change the results, this indicates that there are no trailing spaces in the actual database rows; they are simply added as part of the formatted screen.
By default sqlplus (the command line tool you are using) uses the maximum varchar2 column length as the (fixed) width when displaying the results of a select statement.
If you want to change this, use the column format
sqlplus command before running select. For instance:
column DEPT_NAME format a20
0
a source to share