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
Read great educational content like this and a lot more !
Members get free exclusive access to content, new courses, and discounts. Signup for a free account to write a post / comment / upvote posts. Creating an account takes less than 5 seconds and you can start earning badges & points too