`

常用函数例子

阅读更多
1. replace
select   replace('123abc','12','')   from   dual;    --作用是将12用空值代替

2.substr
    substr('This is a test', 6, 2) --would return 'is'
    substr('This is a test', 6) --would return 'is a test'
    substr('TechOnTheNet', 1, 4) --would return 'Tech'
    substr('TechOnTheNet', -3, 3) --would return 'Net'
    substr('TechOnTheNet', -6, 3) --would return 'The'
    substr('TechOnTheNet', -8, 2) --would return 'On'
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics