Basic question is: When does the non-clustered index update (when we do any updates on table)?
We have created a non-clustered index, when we update the table's column which is the key of non-clustered index then the execution plan is showing only clustered index update.
What about the non-clustered index update?
How the non-clustered index key values modified?
Include Column index:
If we have a non-clustered index by including the column
Ex: TestTable -- id int P.K, Name varchar(50), DeptID INT
i have created non-clustered index on Name by including the DeptID
create index idx_name
on TestTable (Name) Include (Deptid)
that means the non-clustered index leaf level pages contains DeptID also.
My Question is when we update Deptid column of TestTable, how the non-clustered index leaflevel will be updated? Will this non-clustered index update? my execution plan is not showing the non-clustered update.
Please find the attached scripts/execution plan of update statement.