How to update a table with sequence number

Database

How to update a table with sequence number

I need to update a teradata table with sequence number by specifying start and increment values
1 REPLY
N/A

Re: How to update a table with sequence number

untested:
update tab
from
(select pk,
start_value + (increment * (row_number() over (order by whatever) -1)) as id
from tab) as x
set id = x.id
where tab.pk = x.pk

Dieter