Sql server case when null

806    Asked by AryanKhan in SQL Server , Asked on Jan 4, 2020
Answered by Aryan Khan

It’s a common question asked what exactly is sql server case when null. So let us understand: The CASE statement generally goes through various conditions and then returns a value when the first condition is met. So the moment the condition is observed to be true, it stops reading and returns the result. Similarly, if no conditions are true, it returns the value in the ELSE clause. But if there is a situation where there is no ELSE part and no conditions are true, it returns NULL.


Your Answer

Interviews

Parent Categories