Hi, I'm using sql 2005. I use the script below to add the primary key and it executed successfully. However, the primary key doesn't show up in the design mode. I can see the PK in the tree on the left under Columns and the Keys folder.
I have to manually do it in design again for this to show up. What's wrong here and how can I fix this script. I need to create this script for several tables that needs this done and repeat this a couple more times.
Another question, since I can ssis to work (sql 2005 and vs2008 don't work together), I'm just creating TSql SP to clean up and transform a imported database. I'm just curious, does SSIS really would save much more work from scripting if I were to use that instead of coding the TSQL sp?
Here is my script,
alter table dbo.q_history_type add HistoryTypeId int identity(1,1) not null
constraint [PK_dbo.q_history_type_HistoryTypeId] primary key clustered (HistoryTypeId asc)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]