I have trailing spaces in a column in a SQL Server table called Company Name.
Company Name
All data in this column has trailing spaces.
I want to remove all
SQL Server does not support for Trim() function.
But you can use LTRIM() to remove leading spaces and RTRIM() to remove trailing spaces.
can use it as LTRIM(RTRIM(ColumnName)) to remove both.
update tablename set ColumnName= LTRIM(RTRIM(ColumnName))