Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
LemonLunch
Starting Member
2 Posts |
Posted - 2007-10-02 : 13:42:22
|
I run the following code in Query Analyzer to replace a primary keyin a table.Use BaseWsoftDataALTER TABLE PickerWork DROP CONSTRAINT PK_PickerWorkgoALTER TABLE PickerWork ADD CONSTRAINT PK_PickerWork PRIMARY KEY CLUSTERED ([Id] , [PickModule] , [PickerNumber] ) ON [PRIMARY] goSQL VERISON: 8.00.760I get a "The command(s) completed successfully" from QA.The primary key does show correctly ifI double click for the table properties in Enterprise Manager(EM). but when I go into EM table Design Mode the primary key doesnot show. When I exit table design mode, EM asks me to save my changes when I didn't make any via EM.How can I make the primary key show up in design mode in EM?What am I doing wrong? Thanks |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-10-02 : 14:57:37
|
When you say it does not show in design mode, do you mean the little key icon doesn't appear across your 3 columns?Are you sure you don't have multiple PickerWork tables that are perhaps owned by different accounts?Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
LemonLunch
Starting Member
2 Posts |
Posted - 2007-10-02 : 15:24:54
|
Hi Tara, Yes the 3 little key icons do not show in design mode(EM) and the primary key constraint name , PK_PickerWork, does NOT show in Selected index: drop down box. I deleted the table and recreated the table , added the composite primary key via EMand than ran the alter script and it worked just fine. The little key icons were back.I must have corrupted something with my alter table add constraint code.Thank you for responding. |
 |
|
|
|
|