试试这个
select count(*) from b,a where Instr(a.columnA,b.columnB) = 0
or
select count(*) from b,a where Instr(a.columnA,'||'||b.columnB||'||') = 0
如果a.columnA 中不包含b.columnB的值,instr函数就会返回 0
select count(*) from b,a where Instr(a.columnA,b.columnB) = 0
or
select count(*) from b,a where Instr(a.columnA,'||'||b.columnB||'||') = 0
如果a.columnA 中不包含b.columnB的值,instr函数就会返回 0
如果a.columnA 中不包含b.columnB的值,instr函数就会返回 0
==============我的A中有一百多条,B中有2000多条,怎么查询出来,上万条?
select distinct b.* from a
inner join test2 b
on instr(a.columnA,b.columnB)>0
这样应该可以了
inner join b
on instr(a.columnA,b.columnB)>0
这样应该可以了
SELECT * FROM
(SELECT DISTINCT SUBSTR(a.columnA,INSTR(UPPER(a.columnA),B.B,1),LENGTH(RTRIM(B.columnB))) COLA FROM A,B) T
,BTT
WHERE T.columnA = TT.columnB
select count(*) from b where columnB not in (select distinct columnA_split
from temp)
这样做应该可以.
这两个表的关系是1:1 还是1:n呢?你把表的关系帖出来。
where exists (select 1 from A where instr(a.columnA,a.columnB)>0)