I will not store ranked values - they need to be maintained. I usually use a view for things like this:
CREATE VIEW your_view AS
SELECT t.cola,
t.colb,
ROW_NUMBER() OVER(PARTITION BY t.cola
ORDER BY t.colc) AS colc
FROM YOUR_TABLE t
But you can use the WITH clause in UPDATE:
WITH summary AS (
SELECT t.cola,
t.colb,
t.colc,
ROW_NUMBER() OVER(PARTITION BY t.cola
ORDER BY t.colc) AS cold
FROM YOUR_TABLE t)
UPDATE summary
SET colc = cold
source
share