当前位置:首页 > 技术支持 > 正文内容

SQLSERVR 重建索引

正航软件1年前 (2023-11-14)技术支持653

Sql2000语法:

select 'DBCC DBREINDEX(' + object_name(id) + ','''')'

from sysindexes

where id in (select id from sysobjects where xtype='U') and indid in (0,1)


sql2005及以上版本语法:

select 'DBCC DBREINDEX(' + name + ','''')' from sys.tables where type_desc='USER_TABLE' order by name


返回列表

上一篇:正航导航者服务器缓存清理

没有最新的文章了...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。