the bare WHERE clause will refer to what always returns true
WHERE 1 = 1
This is usually used for something like a search form in which the user can enter one or more values, rather than checking the counter to see if you need to add a WHERE clause to add a general WHERE clause and build everything in I. You may run into problems if you don’t check if at least the AND clause has been added.
source
share