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
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/231824.html
標籤:其他
