我有一个由多个表组成的视图,如下所示:
SELECT DISTINCT cols.referenced_entity_name AS TablesName
from
sys.sql_expression_dependencies objs
outer apply sys.dm_sql_referenced_entities ( OBJECT_SCHEMA_NAME(objs.referencing_id) + N'.' + object_name(objs.referencing_id), N'OBJECT' ) as cols
where
objs.referencing_id = object_id('ViewName')
我会得到这个:
TablesName
--------------------------------
table12345654-23232-233
table32423432-23233-232
table232323213-3213-232
问题: 我该如何更新这些表?