Inspectopedia Help

Redundant ELSE NULL clause

Reports redundant ELSE NULL clauses.

Example (MySQL):

SELECT CASE WHEN 2 > 1 THEN 'OK' ELSE NULL END AS alias FROM foo;

The ELSE NULL part will never be executed and may be omitted.

Last modified: 12 March 2024