Friday, 6 September 2013

How to select all columns from one table and join another column from another table where two columns match

How to select all columns from one table and join another column from
another table where two columns match

I have two tables with data. I would like to select all the columns from
Table 1, select one column from Table 2 and join that column to Table 2
Where two columns in Table 2 match with 2 columns in Table 1.
For example:
Table 1 contains: name, firstname, surname, address.... Table 2 contains:
name, firstname, surname, other_number
I would like to add 'other_number' to Table 1 but the data in Table 2 for
columns: firstname and surname must equal/or match the data in the same
columns but in Table 1.
How would i do this?

No comments:

Post a Comment