1. translate把要改的挑出
2.replace掉
You want convert a full name into initials. Consider the following name:
Stewie Griffin
You would like to return:
S.G.
select replace ( translate (ename, 'abcdefghijklmnopqrstuvwxyz',rpad('a',26,'a.')),'a','' )
from emp_1
where esal = '2000'
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23895263/viewspace-681368/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23895263/viewspace-681368/