I have the following table schema:
Table 1
-
field1
Table 2
-
field1 | field2
What I want to do is select field2 from the second table where field1 in the second table doesn't exist in the first table (field1).
I had this :
SELECT t2.field2
, t2.field1
FROM table1 t1
, table2 t2
WHERE t2.field1 != t1.field1
The problem is that this query will retrieve multiple repeated information from table2 if multiple rows apply in table1. I added DISTINCT
and/or LIMIT
but it still doesn't work. Any idea on how to do this?