本文介绍了从两个表中查找不匹配 id 的最快方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有 1000 个值的基表.和第二个具有 100 个值的临时表.我需要通过 guid 比较它们并只返回第二个表中第一个表中不存在的那些行.为此,我需要最快的性能解决方案.谢谢!
I have base table with 1000 values. and second temporary table with 100 values. I need to compare them by guids and return only those rows from second table that do not exist in first table. I need the fastest performance solution for that. Thanks!
推荐答案经典的 left join/isnull 测试
The classic left join/isnull test
select A.* from secondTbl A left join firstTbl B on A.guid = B.guid WHERE B.guid is null更多推荐
从两个表中查找不匹配 id 的最快方法
发布评论