更新时间:2023-01-29 19:42:06
使用 SQL INNER JOIN [ ^ ]
我认为B的相同值可以重复多次。检查这种情况的一种方法是使用EXISTS
子句。
例如:
I take it that the same value for B can be repeated multiple times. One way to check this could be to useEXISTS
clause.
For example:
SELECT *
FROM Table1 t1
WHERE EXISTS (SELECT 1
FROM Table2 t2
WHERE t2.B = t1.B)