UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Unable To Create An Index, Any Versions    
 
   
ordnance1
post Aug 19 2019, 12:28 AM
Post#1



Posts: 684
Joined: 7-May 11



For some reason when I chose a table and right click on Index I get presented with the dialog in the screenshot, note that it says Add at least one index key column t the index. When I click on add it freezes things up. I have tried on multiple Databases/Tables. Any ideas?

Attached File  Untitled_picture.png ( 309.65K )Number of downloads: 6
Go to the top of the page
 
Akudey
post Aug 19 2019, 07:02 AM
Post#2



Posts: 37
Joined: 17-August 13
From: Ghana


Hi Ordnance1
I don't no what you wanted to achieve, but if you really want to add primary key index to the table you already created in MS SQL Server then try this script.
CODE
ALTER TABLE dbo.TableName
   ADD CONSTRAINT PK_TableName_ColumnName PRIMARY KEY CLUSTERED (ColumnName);

see this: SQL CREATE INDEX Statement
Go to the top of the page
 
GroverParkGeorge
post Aug 19 2019, 08:50 AM
Post#3


UA Admin
Posts: 35,867
Joined: 20-June 02
From: Newcastle, WA


I agree that you can probably script the new index. If so, that'll verify the database and table are okay. And if not, perhaps an error message resulting from that script would help identify the problem.

Also, since you are working in SSMS, you might want to check for configuration that might prevent such changes. Also, verify your login has sufficient permissions on this table to create or alter indexes.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    16th October 2019 - 09:48 PM