Home Forums SQL Server 2005 T-SQL (SS2K5) how to alter primary key int datatype to uniqueidentifier RE: how to alter primary key int datatype to uniqueidentifier

  • Drop the PK constraint.

    Add the UID column, add a PK constraint to that.

    Drop the old ID column.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon