我有 2 列 abc 和 bcd 我想将 abc 数据与 bcd 列完全匹配且句子包含 abc 进行比较。
预期结果
最佳答案
您是否尝试选择存在 abc 与行 bcd 匹配的行的所有行?然后使用EXISTS
。
select *
from mytable
where exists
(
select null
from mytable other
where mytable.bcd like concat('%', other.abc, '%')
)
order by abc, bcd;
关于mysql - 查找精确匹配记录和字符串包含第 1 列行单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59382159/