SQL 重建所有的视图
declare @s nvarchar(4000) declare tb cursor local for select 'sp_refreshview '''+name+'''' from sysobjects where xtype='V' and status>=0 order by name open tb fetch tb into @s while @@fetch_status=0 begin --select @s exec(@s) fetch tb into @s end close tb deallocate tb

浙公网安备 33010602011771号