查找重复列的数量

Find number of duplicate columns

我有两个 table,都有一个名为 TestID 的列。

Table 1 有 4000 行 Table 2 有 1000 行。

我想看看 table 2 中有多少行与 table 1 相比在 TestID 列中具有相同的值。

猜测您的期望:

select count(t2.testId) T2Matches
from t1 join t2 on t1.TestId = t2.TestId;