Is there a way I can improve this kind of SQL query performance:
INSERT INTO ... WHERE NOT EXISTS(Validation...)
The problem is when I have ma
Outer Apply tends to work for me...
instead of:
from t1 where not exists (select 1 from t2 where t1.something=t2.something)
I'll use:
from t1 outer apply ( select top 1 1 as found from t2 where t1.something=t2.something ) t2f where t2f.found is null