In a simple sql book, there is a part of the code mention, if I use where 1 = 0, I can safely add OR conditions, for example:
WHERE
1=0
OR name LIKE '%Toledo%'
OR billaddr LIKE '%Toledo%'
OR shipaddr LIKE '%Toledo%'
I did not understand why, when I use where 1 = 0, I can safely add the OR instruction
Is it possible to use something like below?
WHERE
1=1
OR name LIKE '%Toledo%'
OR billaddr LIKE '%Toledo%'
OR shipaddr LIKE '%Toledo%'
I understand what where 1=1is a shortcut to adding an AND operator. I understand, because it where 1 =1will return true. Can I use it for expression Ortoo?
Istill didn't get the part. where 1 = 0
Any explanation would be wonderful.
slier source
share