Originally posted by Radoslaw Sztando:
Why above code does not update column AGE for all records which NAME is null?
Because you aren't using "is null". Null will never match on =.
but I want to have general solution (handling both NULL and not NULL values in WHERE clause). Guys, do you have any idea how to do it?
You are on the right track with your if statement. You just need to add a bit more logic: