i’ve the following table
+-----+------+
| sID | name |
+-----+------+
| 2 | MXX |
| 3 | ISS |
| 4 | FSS |
| 5 | SSA |
| 6 | PSA |
+-----+------+
and the following table
+-----+-------+
| sID | pname |
+-----+-------+
| 1 | qqq |
| 1 | yyy |
| 2 | zzz |
| 1 | lll |
| 2 | mmm |
| 3 | ttt |
| 3 | sss |
| 5 | xxx |
| 5 | iii |
+-----+-------+
and the join result should look like
+-----+-------+----------+
| sID | pname | supplier |
+-----+-------+----------+
| 1 | qqq | |
| 1 | yyy | |
| 2 | zzz | MXX |
| 1 | lll | |
| 2 | mmm | MXX |
| 3 | ttt | ISS |
| 3 | sss | ISS |
| 5 | xxx | SSA |
| 5 | iii | SSA |
+-----+-------+----------+
idea is to put the values of column name from first table in the second table where sID is the same
i tried Select * From TABLE1 c LEFT join TABLE2 T on c.sID=T.sID
Your left join is the wrong way around.
or change your
left jointo aright join