Why do i get erro when alter table command in ms s
hi,
i have created this table in ms sql 2000
CREATE TABLE [Cmm_Category] (
[CatID] [int] IDENTITY (1, 1) PRIMARY KEY CLUSTERED NOT NULL ,
[CatName] [nvarchar] (50) NULL ,
[CatImage] [varchar] (50) NULL ,
[CatFolder] [nvarchar] (50) NULL ,
[Active] [bit] default (1) NULL
) ON [PRIMARY]
GO
but when i export it to my remote server the index of catid and identity field is removed and when i try to modify the table with the syntax below i get erro
Incorrect syntax near '('
alter TABLE [Cmm_Category] Modify (
[CatID] [int] IDENTITY (1, 1) PRIMARY KEY CLUSTERED NOT NULL ,
[CatName] [nvarchar] (50) NULL ,
[CatImage] [varchar] (50) NULL ,
[CatFolder] [nvarchar] (50) NULL ,
[Active] [bit] default (1) NULL
) ON [PRIMARY]
GO
is there any way to set the primary key and identity without recreaing the field?
|