in sql the spaces at the end of the string are removed by code example Example: remove all spaces from string sql SELECT REPLACE(' Hello World ',' ')