-2

I have two tables with a field called Date. I want to select only the dates of Table1 that are diferent from Table2.

In this case, the result would be 4 and 5.

Table1     Table2     Result
Date       Date       Date
1          1          4
2          2          5
3          3
4
5
Paul Noris
  • 103
  • 2
  • 19

1 Answers1

3

If I understand correctly your question you want to select from Table1 the rows that are not in Table2 as well. Here is how you would do that:

SELECT Date FROM Table1 WHERE Date not in (SELECT Date FROM Table2)
Gab
  • 3,404
  • 1
  • 11
  • 22