Mysql
 sql >> Datenbank >  >> RDS >> Mysql

JOIN drei Tabellen

versuchen Sie so etwas

SELECT A.* FROM TableA A
LEFT OUTER JOIN TableB B ON (A.id = B.a_id)
LEFT OUTER JOIN TableC C ON (A.id = C.a_id)
WHERE B.a_id IS NOT NULL 
  OR c.a_id IS NOT NULL