SQL> select * from t_instr;
A
--------------------------------------------------------------------------------
/tymh_images/jc/termSpec/1366181827897iphone520121207144335793_2471.jpg
/tymh_images/jc/termSpec/aaaa520121207144335793_2471.jpg
/x/y/sbc/123.jpg
SQL> select a,substr(a,length(a)-instr(reverse(a),'/',1)+2) from t_instr;
A SUBSTR(A,LENGTH(A)-INSTR(REVER
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
/tymh_images/jc/termSpec/1366181827897iphone520121207144335793_2471.jpg 1366181827897iphone520121207144335793_2471.jpg
/tymh_images/jc/termSpec/aaaa520121207144335793_2471.jpg aaaa520121207144335793_2471.jpg
/x/y/sbc/123.jpg 123.jpg
SQL>
小结:1,reverse
2,instr
3,length
4,substr
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-759099/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-759099/