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

UNISCI tre tavoli

prova qualcosa del genere

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