我有两个表 table1 和 table2
例如:表 1
id1 name1 fatherName1 village1 category1 subcategory1
1, a, x1, v1, c1, sc1
2, b, x2, v2, c2, sc2
3, a, x1, v1, c3, sc3
4, c, x4, v4, c4, sc4
表2
id2 name2 fatherName2 village2 category2 subcategory2
1, a, x1, v1, c5, sc5
2, b, x2, v2, c2, sc2
3, c, x5, v5, c3, sc3
4, d, x6, v6, c6, sc6
上面我提到了表格的 6 列和 4 行。
现在,我需要
all the rows table1 and table2 where
(table1.name1=table2.name2
and table1.fatherName1= table2.fateherName2
and table1.village1=table2.village2)
OR (table1.name1=table1.name1
and table1.fatherName1= table1.fateherName1
and table1.village1=table1.village1)
您可以通过 java 或 sql 来回答它,无论您喜欢什么。伙计们请帮帮我....thanx提前。