8 ms·
I think that it means the reason for doing where 1 = 1 is sometimes to allow for easy insertion of dynamic queries which can be a security and performance issue
by thestepafter 2y ago
I think that it means the reason for doing where 1 = 1 is sometimes to allow for easy insertion of dynamic queries which can be a security and performance issue. The actual usage of where 1 = 1 doesn't cause the security or performance issue.
- AtNightWeCode 2y agoWhich is exactly what the site says. To insert dynamic conditions. I know that you can use 1=1 for the same reasons as trailing commas. But kinda obvious that this is not the case here.
- regexman1 2y agoJust to be clear I'm using it for the same reason as trailing commas. If I'm inspecting a dataset I use WHERE 1=1 so I can add and remove conditions more easily. I realise the confusion is in my wording of dynamic - I might amend the README.md to clarify. Thanks for the feedback!