MySQL 字符串截取函数有:left(), right(), substring(), substring_index()。...;
3.3 :select substring('www.php20.cn',-3);从倒数第3位开始取
输出结果 .cn;
四:substring_index(str,delim,count);截取第...',2)截取第二个点之前的字符
输出结果 www.php20
4.2:
select substring_index('www.php20.cn','.',-2)截取倒数第二个点之后的字符....cn
4.3
select substring_index('www.php20.cn','as',-2)如果未找到delim,则输出所有字符
输出结果 www.php20.cn
字符串截取就介绍这么多了