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

  • Look up ALTER TABLE in books online (web version: http://msdn.microsoft.com/en-us/library/ms190273%28SQL.90%29.aspx)

    ALTER TABLE ... DROP CONSTRAINT ... to remove the pk

    ALTER TABLE ... ADD ... to add a new column

    ALTER TABLE ... DROP ... to drop the old column

    ALTER TABLE ... ADD CONSTRAINT ... to replace the pk constraint.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass