USE [fy_erp]
GO
/****** 对象: StoredProcedure [dbo].[sp_update_index] 脚本日期: 10/28/2013 14:54:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_update_index](@table varchar(100))
DECLARE authors_cursor CURSOR FOR
Select [name] from sysobjects where [name]=@table and xtype='U' order by id
OPEN authors_cursor
FETCH NEXT FROM authors_cursor INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
DBCC DBREINDEX (@name, '', 90)
FETCH NEXT FROM authors_cursor
INTO @name
END
deallocate authors_cursor
GO
/****** 对象: StoredProcedure [dbo].[sp_update_index] 脚本日期: 10/28/2013 14:54:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_update_index](@table varchar(100))
AS
DECLARE authors_cursor CURSOR FOR
Select [name] from sysobjects where [name]=@table and xtype='U' order by id
OPEN authors_cursor
FETCH NEXT FROM authors_cursor INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
DBCC DBREINDEX (@name, '', 90)
FETCH NEXT FROM authors_cursor
INTO @name
END
deallocate authors_cursor