select * from ( select a.*, concat(b.id,'-',b.first_key,'-',b.second_key) as contain_key_word from key_data_0503 a join key_word b on a.question_desc like concat('%' ,b.first_key ,'%') and a.question_desc like concat('%' ,b.second_key ,'%') #where a.create_time < '2017-04-17' order by a.create_time ) t group by id
mysql 关联条件 中使用 like
最新推荐文章于 2025-05-19 06:37:56 发布
本文介绍了一种使用SQL进行复杂条件筛选的方法,通过连接两个表并利用LIKE语句匹配关键词,实现了从大量数据中精确查找含有特定关键词组合的数据记录。
1055

被折叠的 条评论
为什么被折叠?



