Another trick is, if you're programmatically building a SQL statement - adding "WHERE 1=1" makes things easier ... like so:
SELECT *
FROM table
WHERE 1=1
That way, if you want to filter down the result, everything programmatically appended just needs an "AND ..." at the start, like: SELECT *
FROM table
WHERE 1=1
AND age > 21
AND xyz = 'abc' ...
Because without "WHERE 1=1", you'd had to handle the first condition different than all subsequent conditions.