Thursday, April 13, 2006

Tables with computed columns

Computed columns some times causes re-indexing of database to fail. To find out which tables got computed columns, I normally use the following query.

select so.id as ObjectId,
so.name as ObjectName,
sc.name as ComputedColumnName
FROM sysobjects so, syscolumns sc
where so.id = sc.id
and sc.iscomputed = 1
and so.xtype = 'u'

No comments: