Include a column to a existing Non Cluster Index...

  • 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.

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply