SUBSTRING_INDEX(str, delim, count)
str: 要处理的字符串
delim: 分割符
count: 计数 如果为正数,则从左开始数,如果为负数,则从右开始数
使用示例:
SELECT nl_yuzhongfangxiang,substring_index(nl_yuzhongfangxiang,'=', 1) as source ,substring_index(nl_yuzhongfangxiang,'=', -1) as target FROM x_yiyuanpinggu_nengli