解决方案: |
在2006年度的数据库里表WA_GZBItemTitle丢失关系盒索引;
【解决方案】
修改前请务必做好数据备份,再用下面的语句修改
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[WA_GZBItemTitle]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[WA_GZBItemTitle]
GO
CREATE TABLE [dbo].[WA_GZBItemTitle] (
[cGZGradeNum] [varchar] (3) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[iGZBName_id] [int] NOT NULL ,
[cGZItemTitle] [varchar] (100) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[cExpression] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
[iGZItemWidth] [tinyint] NULL ,
[iColWidth] [int] NULL
) ON [PRIMARY]
GO
CREATE CLUSTERED INDEX [NewIndex01] ON [dbo].[WA_GZBItemTitle]([cGZGradeNum], [iGZBName_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[WA_GZBItemTitle] ADD
CONSTRAINT [PK_WA_GZBItemTitle] PRIMARY KEY NONCLUSTERED
(
[cGZGradeNum],
[iGZBName_id],
[cGZItemTitle]
) ON [PRIMARY]
GO
|