Generate a sequential number for each row while inserting - Teradata
Create a unique row number for each row and then insert the data in to the target table
row_number() over(order by a.ts desc) as insert_num ,col1 ,col2 ,col3 from a
Enjoy great content like this and a lot more !
Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds