Drop identity property from an existing column

Code That Drops the IDENTITY Property from an Existing Column

-If other tables’ foreign keys point to the IDENTITY column, drop them. Here, the script drops the foreign key pointing to Orders2.OrderID from OrderDetails2.

ALTER TABLE OrderDetails2

DROP CONSTRAINT FK_OrderDetails2_Orders2

–If a primary key exists on the IDENTITY column, drop the primary key constraint the way this script drops [...]


Share to Facebook Share to Twitter Stumble It Share on Tumblr Digg More...