Avoiding cursors to update many records using a trigger
问题 I have a table with just over 1 million records. Initially, my table is empty, but I use a BULK INSERT to add these records to the database. I have an AFTER INSERT trigger that I use to update the initialValue field in this table. The value of initialValue is a calculation of specific variables in another table ( my_data_db ) summed across all records. I am using the values of the v1 , v2 , etc. columns as the column names in the table my_data_db . I know it's poor practice, but the only way