Why use WHERE 1 or WHERE 1=1? Usually, if conditions are not required in our query statements, we don't use a WHERE clause. But I've seen a WHERE 1 clause being used in many places, even where other conditions are not present.


Why is this done?
Are there specific benefits to the execution time?
Does it enable other functionalities?
Is using WHERE 1=1 similar to this?
Basically it is just for programmer convenience since you can just add additional conditions with AND... after that and it has no impact on execution time.

Check out these links to Stackoverflow:


Why would someone use WHERE 1=1 AND  in a SQL
clause?
“where 1=1”
statement


Note that WHERE 1 is identical to WHERE 1=1; both mean WHERE TRUE but the former is rejected by many database management systems as not really being boolean.