I am trying to join an sql table on to another one if two of the rows are the same in both tables.
This is what I came up with:
SELECT a.name1, a.name2, b.score
FROM a
INNER JOIN b
ON a.name1=b.name1
AND a.name2=b.name2
This does not appear to work for me. Obviously I am an sql noob. Any help appreciated.
Sample data:
Table A
123456789_111_000001,123456789_111_000002
Table B
123456789_111_000001,123456789_111_000002,1.023658
Edit: Okay, it's working now. I must have had some syntax error or something the first time. It took 10 minutes to run and didn't return anything. Should I delete the question?