So many times data with blank spaces may have entered in a datacolumn
of Oracle or SQLServer Database :
In this post I will be removing Blank spaces from start and end of the each data in a column.
Effetively trimming from front and back but not doing anything for spaces in the middle of string.
SELECT LTRIM(SampleColumn) AS "LTRIM"
SELECT RTRIM(SampleColumn) AS "RTRIM"
SELECT LTRIM(RTRIM(SampleColumn)) AS "LRTRIM"
Also you can remove the leading and trailing spaces from the column data by
update MyTable set SampleColumn = ltrim(rtrim(SampleColumn))