需求:如下图表1中某个值是用,分割的,要求表2中的column_value字段存在表1中该字段中,分割的其中一个值的数据找出来

表1 表2
select count(*)
from (select *
from 表1 t1
where exists
(select *
from (select * from 表2) t2
where instr(t1.wfdm, t2.column_value) > 0)) a;
本文介绍了一种使用SQL查询的方法,旨在从表1中找到某个字段值包含表2中column_value字段值的数据。通过使用INSTR函数结合子查询实现这一需求。

3369

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



