Home > Blockchain >  how to do a join query to get wanted values
how to do a join query to get wanted values

Time:03-10

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 ?

CodePudding user response:

Use LEFT OUTER JOIN. E.g.

SELECT *
FROM article a
LEFT OUTER JOIN file f ON f.MyID = a.MyID
  • Related