UPDATE tabella SET campo = concat(round(RAND()*100, 0), '.gif') WHERE campo IS NULL;