t sql remove spaces code example Example 1: sql trim all spaces Select TRIM (' Word ') Example 2: remove spaces sql 2008 SELECT RTRIM(LTRIM(' Word '))