'how to do a join query to get wanted values
I have table article that contains this values
| Date | MyID | Texte |
|---|---|---|
| 06/05/2019 | AC19011 | value 1 |
| 23/12/2016 | P811610-12 | value 2 |
| 29/11/2017 | P8116-150 | value 3 |
my second table file that contains this values
| MyID | link |
|---|---|
| AC19011 | http:/link1.com |
I would like to do a query to get this result
| Date | MyID | Texte | link |
|---|---|---|---|
| 06/05/2019 | AC19011 | value 1 | http:/link1.com |
| 23/12/2016 | P811610-12 | value 2 | |
| 29/11/2017 | P8116-150 | value 3 |
i have done an inner join query it get me only one line .
how could i achieve this ?
Solution 1:[1]
Use LEFT OUTER JOIN. E.g.
SELECT *
FROM article a
LEFT OUTER JOIN file f ON f.MyID = a.MyID
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | a_horse_with_no_name |
