ltrim(x,y) 函數(shù)是按照y中的字符一個一個截掉x中的字符,并且是從左邊開始執(zhí)行的,只要遇到y(tǒng)中有的字符,x中的字符都會被截掉,直到在x的字符中遇到y(tǒng)中沒有的字符為止函數(shù)命令才結(jié)束 。
參閱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函數(shù)的第二個參數(shù)實際上是個集合,Oracle數(shù)據(jù)庫會從char的第一個字符開始掃描,移除掉set集合中出現(xiàn)的字符,直到遇到一個不在set集合中的字符為止。