ltrim(x,y) 函数是按照y中的字符一个一个截掉x中的字符,并且是从左边开始执行的,只要遇到y中有的字符,x中的字符都会被截掉,直到在x的字符中遇到y中没有的字符为止函数命令才结束 。
参阅Oracle® Database SQL Reference
10g Release 2 (10.2)
Part Number B14200-02
中所说的
LTRIM的原型是LTRIM(char [, set ])
LTRIM removes from the left end of char all of the characters contained in set. If you do not specify set, it defaults to a single blank. If char is a character literal, then you must enclose it in single quotes. Oracle Database begins scanning char from its first character and removes all characters that appear in set until reaching a character not in set and then returns the result.
LTRIM函数的第二个参数实际上是个集合,Oracle数据库会从char的第一个字符开始扫描,移除掉set集合中出现的字符,直到遇到一个不在set集合中的字符为止。