Please see my sample data here: http://sqlfiddle.com/#!2/12bda/3/0
The results are not what I intended. Is there a way to show the result table as below:
EMPLID  NAME    NAMETYPE    GENDER  VISA      Passport
10001   CAT     PRI         F       A         USA
10001   DOG     SEC         null    null      GBR
10001   FISH    LEG         null    null      null
10002   FOOD    PRI         F       V         USA
10002   null    null        null    A         null
10003   FOOD    PRI         M       C         null
10003   null    null        null    B         null
10004   FOOD    PRI         M       D         null
I looked into the solution from this post: full outer join in mysql
However, I need the repeated value to be null. Is it possible?