Need help for two tables

Hi i need some help on this, how can i join this two tables to display all the records even the first table has no match in second table and only to display one company image…is this possible? I tried to use the inner join but the image is displaying 3 times because i have match in second table with 3 7’s,but i cannot display the image even it is not match in second table.

can you help me on this please

Thank you in advance.

firsttble


compID      empCompName                      companyimage
  1             universalpicture                       image

  7              Pixelite                                 image

   8             Vanchour                              image


secondtable



  compID                  Address
    7                          Texas

    7                          Sweeden

    7                          Mexico

use a LEFT OUTER JOIN with firsttble as the left table

Hi thank you for the reply…but it will only display one address if the second table match to the first table.


     select frst.*,scnd.*
                          from firsttable frst right outer join
                          scnd secondtable
                          on frst.compid = scnd.compID
  

i suggested a left outer join

you wrote a right outer join

why?

Hi sorry for that typo it must be left, yes i already tried the left outer join…it will only return one address.

please show your real query and your real tables, not the fake “firsttable” and “scnd”

Hi,Thank you…it’s okay now :slight_smile: