zno2

mysql string function

 https://dev.mysql.com/doc/refman/5.5/en/string-functions.html

 

1) replace

update zxg set newlevel = REPLACE(newlevel,'b','')

把表zxg中的newlevel字段中的b删除

 

2) SUBSTRING_INDEX

select SUBSTRING_INDEX('123|456', '|', 1) from dual; # 123
select SUBSTRING_INDEX('123|456', '|', -1) from dual; # 456

 

posted on 2016-08-05 17:58  zno2  阅读(189)  评论(0编辑  收藏  举报

导航