@gilbert
You can update a column with row number in Teradata by using a subquery with the ROW_NUMBER() function. Here is an example query to update a column with row number in Teradata:
1 2 3 4 5 6 7 |
UPDATE your_table SET column_name = row_num FROM ( SELECT column_name, ROW_NUMBER() OVER (ORDER BY some_column) AS row_num FROM your_table ) AS subquery WHERE your_table.primary_key = subquery.primary_key; |
In this query:
This query will update the specified column with row numbers based on the specified column order.