Manually specify starting value for Row_Number()
Just add the value to the result of row_number(): select 3258170 – 1 + row_number() over (order by (select NULL)) as idd The order by clause of row_number() is specifying what column is used for the order by. By specifying a constant there, you are simply saying “everything has the same value for ordering purposes”. … Read more