Mysql
 sql >> Database >  >> RDS >> Mysql

Impossibile elaborare la query MySQL FULL JOIN

per simulare FULL JOIN in mysql, devi UNION il risultato di Right Join e Left Join da entrambe le tabelle

SELECT  Persons.Name, Persons.P_Id, Invoice.Id
FROM    Persons
        LEFT JOIN Invoice
            ON Persons.P_Id=Invoice.P_Id
UNION
SELECT  Persons.Name, Persons.P_Id, Invoice.Id
FROM    Invoice
        LEFT JOIN Persons
            ON Persons.P_Id=Invoice.P_Id