ltrim(x,y)函数

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容