The topic describes the DF185 T-SQL code analysis rule.
BEST PRACTICE
ELSE NULL is used in CASE expression.
It is recommended to omit the ELSE NULL statement in the CASE expression as it will still return NULL as default value.
SELECT CASE WHEN Qty < 10 THEN 'Low' ELSE NULL END AS prt_level
FROM dbo.Storage
GO
SELECT CASE WHEN Qty < 10 THEN 'Low' END AS prt_level
FROM dbo.Storage
GO