Why is SQL not matching two strings?

Viewed 432

As I said in the title, I have a query that doesn't return what's expected and it isn't logical... Here is the case :

Table A -> id INT, value VARCHAR

Table B -> id INT, value VARCHAR

When I run that query SELECT value FROM A WHERE value NOT IN (SELECT value FROM B);

I expect that query to return all values that are not in the table B, but it returns all the values.

Let's assume that A contains

  1. '425415'
  2. '698741'

With that query : SELECT value FROM A WHERE value NOT IN ('698741','425415'); it still returns all the values without triggering the NOT IN...

2 Answers
Related