我想搜索列是否参与计算列表达式。
我想出了这个
SELECT
(select name
from sys.columns
where column_id = sys.sql_expression_dependencies.referencing_minor_id
and object_id = sys.sql_expression_dependencies.referencing_id) as [dependant_column]
FROM sys.sql_expression_dependencies
WHERE referencing_minor_id > 0
and referencing_class = 1
and referenced_class = 1
and object_name(referencing_id) = 'trns1'
and referenced_minor_id = (select column_id
from sys.columns
where name = 'class1'
and OBJECT_NAME(object_id) = 'trns1')
请帮忙。