How to join two tables by multiple columns in SQL?

后端 未结 5 1010
既然无缘
既然无缘 2020-12-29 06:03

I have two tables named Evaluation and Value.

In both tables, there are four columns. But three of the four are the same. In other words, th

5条回答
  •  星月不相逢
    2020-12-29 06:50

    No, just include the different fields in the "ON" clause of 1 inner join statement:

    SELECT * from Evalulation e JOIN Value v ON e.CaseNum = v.CaseNum
        AND e.FileNum = v.FileNum AND e.ActivityNum = v.ActivityNum
    

提交回复
热议问题