4 ms·
You can do this SELECT B.* FROM tableB B LEFT JOIN tableA A ON A.key1= B.key1 and A.key2=B.key2 WHERE A.key1 IS NULL Or use NOT EXISTS depending on the da
by rawgabbit 6y ago
You can do this
SELECT B.*
FROM tableB B
LEFT JOIN tableA A
ON A.key1= B.key1
and A.key2=B.key2
WHERE A.key1 IS NULL
Or use NOT EXISTS depending on the database you use.
https://dba.stackexchange.com/questions/121034/best-practice-between-using-left-join-or-not-exists https://dba.stackexchange.com/questions/121034/best-practice...
- murilogustineli 6y agoThat helps! Thank you!