Click here to Skip to main content
15,885,885 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello, for some reason when I try to make a column an identity it gives me the error that column names must be unique. I know what this is supposed to mean, but the problem is that I don't have duplicate columns. Also, I tried to make other columns the identity just to test it out and it doesn't work on any column in my table. Has anyone ever ran into this problem?
Posted
Comments
Kornfeld Eliyahu Peter 3-Mar-15 13:34pm    
You may already have an identity column?
Sergey Alexandrovich Kryukov 3-Mar-15 14:04pm    
How are we supposed to be sure that your column names are unique in the scope of the table? The facts, as you present them, tell us the opposite.
—SA
britbarnes 3-Mar-15 14:09pm    
How can I show you that they are unique in the scope of the table?
Sergey Alexandrovich Kryukov 3-Mar-15 14:19pm    
This is up to you how you do it. I shared my though on that, you can use it. Just check up things properly.
—SA
britbarnes 3-Mar-15 14:21pm    
When I used select * from table, there were no duplicate columns. Is there another method I should use to check for duplicates that maybe I can't see?

1 solution

If you have data in your table then you have to make sure that the data is unique and without duplicates before altering that table, the error is probably referring to that and not the column name.
 
Share this answer
 
v2
Comments
britbarnes 3-Mar-15 13:46pm    
Hello thank you, but I double checked and do not have any duplicate rows in this column
PIEBALDconsult 3-Mar-15 14:02pm    
Not rows, column names.
britbarnes 3-Mar-15 14:06pm    
I also made sure that there were no duplicate columns in the table. Could they be hidden somewhere?
britbarnes 3-Mar-15 14:27pm    
There is no duplicate data in the columns or the rows
Mehdi Gholam 3-Mar-15 14:35pm    
Try creating a new table with structure you require and then moving your data into that.

Also since we cannot see what you have done and the error you are getting there is very little we can do other than speculate.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900