Scenario:
- Table has 1 or more computed columns. Those columns have simple calculations based solely on the values of other columns in the table. Columns are marked as PERSISTED.
- Table has an AFTER INSERT, UPDATE trigger to INSERT or UPDATE rows to a second table.
- Second table schema is identical EXCEPT there are no computed columns.
- After deploy and table use (table now has production data in it), it is determined that the calculation is in error and needs to be corrected.
The developer expected that changing the computed column calculation would cause the trigger to fire (basically a DML operation). What was observed was more like a DDL operation. The source table showed the correct results of the changes to the calculation but the second table did not. The fact that the computed column values were corrected led the dev to conclude that the changes would be reflected in the other table.
It is my assertion that such a table change is similar to altering the type of a column. It is a DDL operation and does not qualify as an operation that would cause a DML trigger to fire. The problem is that I am inferring that result based on experience. I have not found documentation stating that this should be the expected result. Can anyone enlighten me?
THank you