数据库修复索引语句: use hbposv8 ----分店改为hbposv8_branch go declare @tablename varchar(100) declare test_cur cursor for select object_name(id) from sysobjects where type ='U' open test_cur fetch test_cur into @tablename while @@fetch_status=0 begin DBCC DBREINDEX(@tablename) fetch test_cur into @tablename end close test_cur deallocate test_cur go