如何返回字符串排除查询字符串。
column string = AAA/BBB/CCC
result string = BBB/CCC where column like AAA
column string = AAA/BBB/CCC
result string = CCC where column like AAA/BBB
"SELECT DISTINCT `column` FROM `table` WHERE `column` like '???'";
谢谢。
答案 0 :(得分:1)
select distinct replace(column, 'AAA/BBB/', '') as column
from table
where column like 'AAA/BBB/%';