美文网首页
ltrim(x,y)函数

ltrim(x,y)函数

作者: forever_smile | 来源:发表于2017-07-10 14:51 被阅读0次

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集合中的字符为止。

相关文章

网友评论

      本文标题:ltrim(x,y)函数

      本文链接:https://www.haomeiwen.com/subject/kvoyhxtx.html