[mysql] 2024-04-20 圈点481
摘要:select num from a where num in(select num from b) 用下面的语句替换: select num from a where exists(select 1 from b where num=a.num)
mysql中where in与 where exists的区别,如下所示:
select num from a where num in(select num from b) 用下面的语句替换: select num from a where exists(select 1 from b where num=a.num)