First check the output of "select LTRIM(' startech academy ', ' sta');" output is "rtech academy " now the thing is output of "select LTRIM(' startech academy ', ' star');" output is "ech academy " the question is where is 't'?
It's trimmed, because you asked t to be removed. It trims every single character at the beginning of the string till it encounters another character. The doc example makes it more clear:
The problem is when we do LTRIM for trimming the first four characters, it trims the first five characters. but in the case of doing three characters, it gives the correct output.