我的表格与下面的类似。我想选择城市和城镇匹配且代码或区域重复的记录。在这种情况下,行的结果应该是除 id 3 和 5 之外的所有行。感谢您查看此内容
city town id code1 code2 code3 code4 area1 area2 area3 area4
----------------------------------------------------------------------------------
dublin town1 1 1 2 3 5 1 2 3 4
dublin town1 2 2 8 10 6 7 8 9
dublin town1 3 12 13 15 11 12 13 14
dublin town2 4 1 2 3 5 1 2 3 4
dublin town2 5 6 7 8 10 6 7 8 9
dublin town2 6 11 12 13 15 1 12 13 14