How can I change primary key on SQL Azure

前端 未结 5 1580
无人共我
无人共我 2021-02-07 04:44

I am going to change the primary key on SQL Azure. But it throws an error when using Microsoft SQL Server Management Studio to generate the scripts. Because every tables on SQL

5条回答
  •  你的背包
    2021-02-07 05:03

    I appreciate that this may be late in the day for yourself, but it may help others.

    I recently came across this issue and found the least painful solution was to download the database from Azure, restore it locally, update the primary key locally (as the key constraint is a SQL Azure specific issue), and then restore the database back into Azure.

    This saved any issues in regards to renaming databases or transferring data between them.

提交回复
热议问题