码迷,mamicode.com
首页 > 数据库 > 详细

Oracle 11g SQL fundamentals 01 -- 字符串操作函数

时间:2014-11-08 23:21:00      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:style   color   sp   on   bs   ad   ef   sql   oracle   

concat(‘Hello‘,‘World‘)     拼接             HelloWorld
substr(‘HelloWorld‘,1,5)  截取       Hello
length(‘HelloWorld‘)         字符串长度     10
instr(‘HelloWorld‘,‘w‘)   w字符第一次出现的位置     6
lpad(1200,6,‘*‘)   如果1200补足6位,在1200的左边补‘*’   **1200
rpad(1200,6,‘*‘)   如果1200补足6位,在1200的右边补‘*’   1200**
replace(‘JACK and JUE‘,‘J‘,‘BL‘) 将字符串中的‘J’替换为‘BL‘  BLACK and BLUE
trim(‘H‘ FROM ‘Hello Word‘) 去掉字符串中的所以‘H’字符   ello Word

Oracle 11g SQL fundamentals 01 -- 字符串操作函数

标签:style   color   sp   on   bs   ad   ef   sql   oracle   

原文地址:http://www.cnblogs.com/ruiming-chen/p/4084176.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!