April 21, 2009 at 5:53 am
Hi,
I have a Non cluster Index on a PK column. and I need to Include one more column to the existing non cluster index.
Table Script:
-----------------
CREATE TABLE [dbo].[Request](
[RequestID] [bigint] IDENTITY(1,100) NOT FOR REPLICATION NOT NULL,
[Requestor] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[RequestorTypeID] [smallint] NOT NULL,
[RequestTypeID] [tinyint] NOT NULL,
[RequestStatusID] [tinyint] NOT NULL,
[ServerID] [smallint] NOT NULL,
[ApplicationID] [int] NOT NULL,
[LogGUID] [uniqueidentifier] NULL,
[ChangeControl] [timestamp] NOT NULL,
[CreatedBy] [varchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_Request_CreatedBy] DEFAULT (suser_sname()),
[CreatedDate] [datetime] NOT NULL CONSTRAINT [DF_Request_CreatedDate] DEFAULT (getdate()),
[PlatformID] [tinyint] NOT NULL CONSTRAINT [DF_Request_PlatformID] DEFAULT (1),
CONSTRAINT [RequestPK] PRIMARY KEY NONCLUSTERED
(
[RequestID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
Need to Include CreatedDate clumn to already existing Index RequestPK. Can some one help me on this.
April 21, 2009 at 6:50 am
Please don't cross post. It just wastes peoples time and fragments replies.
No replies to this thread please. Direct replies to: http://www.sqlservercentral.com/Forums/Topic701350-338-1.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply