sqlserver 用于刷新当前数据库所有视图的存储过程 create procedure dbo.proc_refreshview as begin declare @viewname varchar(100) decl
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
--结束END--
本文标题: sqlserver刷新视图
本文链接: https://www.lsjlt.com/news/2442.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0