Zkuste tento dotaz -
UPDATE refs_table t1
JOIN (
SELECT RefID, @s:=IF(Status IS NULL, @s, Status) Status
FROM (SELECT * FROM refs_table ORDER BY RefID) r,
(SELECT @s:=NULL) t
) t2
ON t1.RefID = t2.RefID
SET t1.Status = t2.Status
Zkuste tento dotaz -
UPDATE refs_table t1
JOIN (
SELECT RefID, @s:=IF(Status IS NULL, @s, Status) Status
FROM (SELECT * FROM refs_table ORDER BY RefID) r,
(SELECT @s:=NULL) t
) t2
ON t1.RefID = t2.RefID
SET t1.Status = t2.Status