I have a remote sql server database provided by a host that I can connect to using SQL Server Management Studio.
I exported the tables from my local database and all seemed fine until I saw that some tables had lost the id fields' primary key setting on the column and also the identity seed. This means that I can't create new rows using my website admin system.
I've tried right clicking and changing the column properties through mangement studio, but no luck, tried doing via an SQL query also no luck. There seem to be persmissions / constraint issues that are preventing me from doing this.
How can I make my if fields primary keys and have identity(1,1) again? Is there a way to copy the contents of the column to a new column?
I tried creating a new column that is a primary key and has identity(1,1) but I can't update the values in this column from the old id field as its not allowed.
What are my options?