Why "SELECT ... WHERE id=1=0" returns all rows except one with id=1?
The reason is that the logic should be being evaluated as:
WHERE (id = 1) = 0
This is equivalent to:
WHERE (id = 1) "is false"
Or:
WHERE id <> 1
Try running these examples:
select 1=1=0, 1=2=3, 1=1=0
Default operator precedence works as follows :
WHERE (ID=1)=0
Which resutls false in case of id=1