How to check if computed column is persisted? (MS SQL Server)
Computed column attributes are available in sys.computed_columns.
select * from sys.computed_columns where is_persisted = 1
is_persisted = 1 for the column being persisted, 0 otherwise.
You can link this back to sys.tables via the object_id e.g.
select t.name, c.name
from sys.tables t
inner join sys.computed_columns c on c.object_id = t.object_id
where c.is_persisted = 1
And change your where clause to include the table name / field name as appropriate to your scenario.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With