As for example, I am using this website: https://sqliteonline.com/.
I try to fuzz around with queries and did as such:
SELECT * FROM demo
WHERE Name="SQL " || "Online"
Which correctly retrieved:
1-SQL Online-for Data Science
Now I tried to use the AND operator:
SELECT * FROM demo
WHERE Name="SQL " || "Online" AND Hint=1 IS NOT 2
which retrieved the same answer as before, because 1 is indeed not 2 thus it is Query AND True=>True.
But if I changed it to something else, let's say:
SELECT * FROM demo
WHERE Name="SQL " || "Online" AND Hint=1 IS NOT 1
It returns the same answer as before! even though 1 IS NOT 1 is completely false, as I've seen in this query:
SELECT *, 1 IS NOT 1 AS isTrue FROM demo
WHERE Name="SQL " || "Online" AND Hint=1 IS NOT 1
where isTrue=0
So this query is basically this one:
SELECT *, 1 IS NOT 1 AS isTrue FROM demo
WHERE Name="SQL " || "Online" AND Hint=0
But when I execute this query explicitly, it does not retrieve any results!
What is going on here? I would appreciate your help! Thank you.