The following query returns the result 'XxyLAST WORD'. LTRIM removes the individual occurrences of 'x' and 'y', and stops removing characters at 'X', which is not in the expr2 argument.
SELECT LTRIM('xyxXxyLAST WORD','xy');
The following query returns the result 'LEFT TRIM'. LTRIM, removes the spaces from the left, and stops removing characters at 'L', which is not in the expr2 argument. Because the expr2 argument is not explicitly specified, the default of a single space is used.
SELECT LTRIM(' LEFT TRIM');
The following query returns the result 'LEFT TRIM'. LTRIM, removes the spaces from the left, and stops removing characters at 'L', which is not in the string2 argument. Because the string2 argument is not explicitly specified, the default of a single space is used.
SELECT LTRIM(' LEFT TRIM');