sqlserver用于刷新视图的存储过程
create procedure dbo.proc_refreshview as begin declare @viewname varchar(100) declare cur_view cursor for select [name] from sysobjects where [type]='v' open cur_view fetch next from cur_view into @viewname while(@@fetch_status=0) begin exec sp_refreshview @viewname fetch next from cur_view into @viewname end close cur_view deallocate cur_view end