String Functions – LTRIM()

I am going to continue my series of very short articles or tidbits on Transaction SQL string functions. I will exploring the LTRIM() function today. The LTRIM() function takes a source string as input and returns a output string with all leading spaces removed. The following example removes leading spaces from a favorite movie title of mine.

One thing to always worry about when using TSQL functions is how will it react with empty strings or NULL values? Both empty strings and NULL values as input return themselves…