检查所有表是否有错误
2022年8月11日
declare @name varchar(100)
declare cur cursor for
select name from sysobjects where xtype=’u’ order by name
open cur
fetch next from cur into @name
while @@fetch_status=0
begindbcc checktable(@name)
fetch next from cur into @name
end
close cur
deallocate cur
声明: 本文采用 BY-NC-SA 协议进行授权. 转载请注明转自: 检查所有表是否有错误