SQL
Constant condition
Warning
Last modified: 03 December 2024Reports conditions in WHERE or JOIN clauses that are always TRUE or always FALSE.
Example (MySQL):
CREATE TABLE t1 (a TEXT, b INT, c BOOLEAN);
SELECT a FROM t1 WHERE 'Cat' = 'Cat';
The 'Cat' = 'Cat'
is always true and will be reported.
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
SqlConstantConditionInspection
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Database Tools and SQL, 241.SNAPSHOT |
Thanks for your feedback!
Was this page helpful?