I am trying to replace NULL values in table by using SELECT with one (randomized?) string from the set that I provide to the compiler.
|id | date | +---+------+ | 1 | 2017 | | 2 | NULL | | 3 | NULL |
I want the
NULL values to be '2015', '2012', etc, taken randomly from the set I specify.
COALESCE returns only first not null value rather than one from the specified. Is there some function that works like:
IF column_value = 'NULL (or something)' THEN RAND(string1, string2, string3, string4).
Thanks in advance.