Can someone explain to me what this sql statement does and why it works?
insert into customers
select CustID,CustName from isc..tblArCust c
LEFT JOIN customers cu ON cu.customer = c.CustId
WHERE cu.customer is null
As I understand it, it inserts rows from the table tblArCust in database isc to rows in the customer table in the current database. Somehow, the where clause causes only rows that do not already exist in the current database to be appended. Why is that?