NOT IN
SELECT TABLE_A.COLUMN_A
FROM TABLE_A
WHERE TABLE_A.COLUMN_A NOT IN
(
SELECT TABLE_B.COLUMN_A
FROM TABLE_B
)
JOIN dan IS NULL
SELECT TABLE_A.COLUMN_A
FROM TABLE_A
LEFT JOIN TABLE_B
ON TABLE_A.COLUMN_A = TABLE_B.COLUMN_A
WHERE TABLE_B.COLUMN_A IS NULL
query ini udah ku coba di MSSQL dan Oracle, hasilnya bisa dieksekusi jauh lebih cepat
1 comment:
Good for people to know.
Post a Comment