擅长:python、mysql、java
<p>Parfait提供的SQL语句是首选的解决方案,但如果您真的想使用双循环方法,则需要更像这样:</p>
<pre><code>for rit in rows1:
match_found = False
for git in rows2:
if (rit[1] == git[1]) and (rit[2] == git[2]):
match_found = True
break
if not match_found:
print(rit)
</code></pre>