5

I have computed column in table called "Claim" and definition of column is calling one scalar function.

I created a 10000 claims so when i select those 10000 claims the computed column will update are when 10000 rows inserting itself the computed column will execute?

Please update me

Thanks in advance

VInayK
  • 1,501
  • 6
  • 34
  • 47

2 Answers2

7

It depends if the computed column is marked as persisted or is indexed.

If neither of these conditions are true then nothing is stored and it is calculated at runtime. Otherwise it is automatcally updated when the underlying data changes.

Martin Smith
  • 438,706
  • 87
  • 741
  • 845
1

The computed column computes its value when you execute a SELECT command that includes the column, assuming that the computed column's value is not PERSISTED.

Brian Driscoll
  • 19,373
  • 3
  • 46
  • 65