今天我注意到当我更改视图中的表时,如果不运行 sp_refreshview,则不会更新该视图的 syscolumns。下面的代码显示了我在说什么
create table Test ( n1 decimal(12,4) )
go
create view VTest as Select * from Test;
go
sp_help VTest
go
alter table Test alter column n1 decimal(12,2)
go
sp_help VTest
请注意,VTest 保持静态,是否有某种方法可以自动执行此过程?