You can disable the Identity property, but it involves editing system tables, which are not considered good practice. You are also unlikely to have the necessary rights and are likely to see You do not have permission to run the RECONFIGURE statement by running the following code:
DECLARE @tableName nvarchar(128) = 'YourTable'; -- Get a list of identity columns (informational) SELECT OBJECT_NAME(object_id) tableName, sc.name colName, st.name dataType FROM sys.columns sc JOIN sys.types st ON st.system_type_id = sc.system_type_id WHERE sc.is_identity = 1 AND OBJECT_NAME(object_id) = @tableName -- Allow ad-hoc changes to system catalogs EXEC sp_configure 'allow update', 1 GO reconfigure with override GO -- Eliminate the identityness UPDATE syscolumns SET colstat = colstat - 1 WHERE id = object_id(@tableName) AND name = 'Id' -- Specify column if you like, though only one identity per table is currently supported GO -- Unallow ad-hoc changes to system catalogs exec sp_configure 'allow update', 0 GO reconfigure with override GO
Charles burns
source share