SQL

SQL

Made by DeepSource

Redundant ELSE NULL SQL-L035

Style
Minor

Do not specify ELSE NULL in a CASE WHEN statement as it maybe redundant.

Bad practice

select
    case
        when name like '%cat%' then 'meow'
        when name like '%dog%' then 'woof'
        else null
    end
from x

Recommended

select
    case
        when name like '%cat%' then 'meow'
        when name like '%dog%' then 'woof'
    end
from x