工资发放签名表 项目混乱

问题描述:
工资发放签名表项目混乱,不能用重建项目顺序,重建表也不行。
解决办法:
U890及以下版本:

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

U8V10.0及以上版本:

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] [nvarchar] (3) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[iGZBName_id] [int] NOT NULL ,
[cGZItemTitle] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[cExpression] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
[iGZItemWidth] [tinyint] NULL ,
[iColWidth] [int] NULL ,
[iYear] [smallint] NOT NULL
) ON [PRIMARY]
GO

setuser
GO

EXEC sp_bindefault N'[dbo].[WA_GZBItemTitle_iColWidth_D]', N'[WA_GZBItemTitle].[iColWidth]'
GO

EXEC sp_bindefault N'[dbo].[WA_GZBItemTitle_iGZBName_id_D]', N'[WA_GZBItemTitle].[iGZBName_id]'
GO

EXEC sp_bindefault N'[dbo].[WA_GZBItemTitle_iGZItemWidth_D]', N'[WA_GZBItemTitle].[iGZItemWidth]'
GO

setuser
GO


你可能感兴趣的:(工资发放签名表 项目混乱)