I think SQL is a very simple language, but ofcourse I'm
But even a simple statement might have more complexity to it than you might think.
Do you know what the result is of this statement?
SELECT FALSE = FALSE = TRUE;
scroll down for the answer.
The answer is: it depends.
You might expect it to return false because the 3 items in the comparison are not equal. But that's not the case.
In PostgreSQL this is the result:
postgres=# SELECT FALSE = FALSE = TRUE;
So it compares FALSE against FALSE, which results in TRUE …[Read more]