[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Converting table PK from INT to GUID in SQL Server 2005

Posted on 2008-11-12
Medium Priority
Last Modified: 2012-05-05
I need to convert production database table PK from INT to GUID.
The table PK is a FK in other database tables.

I have found this solution:

But, it seems too much complicated and risky.

I will be glad to accept any simpler & safe solution

Question by:elimesika
LVL 143

Accepted Solution

Guy Hengel [angelIII / a3] earned 2000 total points
ID: 22937632
that's the way to go. you need a "mapping" table of the INT and the GUID table, and update from there.
LVL 19

Author Closing Comment

ID: 31515867
Thanks angelIII, bad news for me, but I will go for it ....

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question