ISNULL() replaces NULL with the value you provide. For example: DECLARE @var int SET @var = NULL select ISNULL(@var, 100) as [Var] This returns 100. Simple and easy, right? ISNULL is often used to take care of NULLs in mathematical sets. For example: SELECT AVG(ISNULL(Charge, 0)) FROM BankAccount This will change all NULLs to 0, so we can use […]
Interesting Tidbit on ISNULL()
- Post author By Jen McCown
- Post date
- Categories In Uncategorized
- 1 Comment on Interesting Tidbit on ISNULL()