id
number
UPDATE
tbl,
(select @cnt := 0) as cnt
SET
number=(@cnt:=@cnt+1)
ORDER BY id DESC
For the multiple-table syntax, UPDATE updates rows in each table named in table_references that satisfy the conditions. In this case, ORDER BY and LIMIT cannot be used.
UPDATE tbl SET
number=(@cnt:=@cnt+1)
WHERE !@cnt:=0
ORDER BY id DESC