substring_index(str,delim,pos):str:指定字符串;pos:字符串长度;规则:无符号从左,负号从右,数值是其占位数;delim:定义规则;
案例:
select CONCAT(SUBSTRING_INDEX(name,'(',1) ,SUBSTRING_INDEX(name,')',-1)) from table_name
where name like '%(%'
如果有其它实现方式,欢迎交流。。。。。。。。。。。
substring_index(str,delim,pos):str:指定字符串;pos:字符串长度;规则:无符号从左,负号从右,数值是其占位数;delim:定义规则;
案例:
select CONCAT(SUBSTRING_INDEX(name,'(',1) ,SUBSTRING_INDEX(name,')',-1)) from table_name
where name like '%(%'
如果有其它实现方式,欢迎交流。。。。。。。。。。。