I am trying to display results in which a value in my first result table is NOT contained in the second result table. Any idea on how to do this .
SELECT CUSTOMERID, CUSTOMER FROM TABLE1
WHERE CUSTOMERID NOT IN TABLE2
Transact-SQL
I am trying to display results in which a value in my first result table is NOT contained in the second result table. Any idea on how to do this .
SELECT CUSTOMERID, CUSTOMER FROM TABLE1
WHERE CUSTOMERID NOT IN TABLE2
select
c1.customerid, c1.customerfrom
table1 c1left
join table2 c2 on c1.customerid = c2.customeridwhere
c2.customerid is null