I have some problem about my query,
I wonder how can i find result that only exist on table 1, but not table 2
table 1 - {card_no, other_data}
table 2 - {card_no, other_data2}
let say table 1 have record {1, data1}, {2, data2}, {3,data3}
table 2 have record {1, dataa}, {3, datac} ,{4, datad}
i would like to have record {2, data2} only
i try this query but not work?
SELECT *
FROM table1 as r
WHERE r.card_no NOT LIKE (SELECT s.card_no
FROM table2 as s
WHERE s.card_no = r.card_no)";
I wonder how can i find result that only exist on table 1, but not table 2
table 1 - {card_no, other_data}
table 2 - {card_no, other_data2}
let say table 1 have record {1, data1}, {2, data2}, {3,data3}
table 2 have record {1, dataa}, {3, datac} ,{4, datad}
i would like to have record {2, data2} only
i try this query but not work?
SELECT *
FROM table1 as r
WHERE r.card_no NOT LIKE (SELECT s.card_no
FROM table2 as s
WHERE s.card_no = r.card_no)";