TRIM in SQL




The TRIM function is helped to remove specified prefix or suffix from a string. The most commonly we are using to remove white spaces.
 



SELECT RTRIM(LTRIM(' dotnettips4all ')) AS TRIM

SELECT RTRIM('             dotnettips4all             ')  AS RTRIM

SELECT LTRIM('        dotnettips4all          ')AS LTRIM