Oracle
 sql >> Database >  >> RDS >> Oracle

Oracle SQL INNER Join basato su valori non corrispondenti

SELECT * FROM Table1 tl INNER JOIN Table2 t2 
ON (tl.ColA = t2.ColB OR (tl.ColA ='AB3' AND t2.ColB='AB_MNO_3')
OR (tl.ColA ='AB3' AND t2.ColB='AB_PQR_3') OR (tl.ColA ='AB4' AND t2.ColB='AB_MNO_4')
OR (tl.ColA ='AB4' AND t2.ColB='AB_PQR_4'))