[解决办法] 个人觉得in和=效果差不多 select * from B where cc in (select cc from A) ; 假如:select cc from A就只有2个值1,2 oracle会把上面的语句变成 select * from B where cc=1 or cc=2;
如果B表上cc列有索引,2条语句都能使用索引 效率上select * from B where cc=1 or cc=2;略高些,也就高在将select * from B where cc in (select cc from A) ;的过程转为select * from B where cc=1 or cc=2;