在一个 JOIN 语句中链接多个 ON 子句
两个表中,三个字段的值相同时,取出这条记录
SELECT fields
FROM table1 INNER JOIN table2
ON table1.field1 compopr table2.field1
table1.field2 compopr table2.field2
table1.field2 compopr table2.field3
这两个条件怎么加上去?
谢谢
------解决方案--------------------SELECT fields
FROM table1 INNER JOIN table2
ON table1.field1 = table2.field1
and table1.field2 = table2.field2
and table1.field2 = table2.field3