I have a large list of tables and due to change in middleware platform, the middleware is no longer creating the auto-increment on Add New Record at the app layer, as a result, I need to do this in the DB.
How can I Search all tables, find PrimaryKeys with Id = int/bigint ?
enable/toggle all tables PrimaryKeys with Id =
Identity with auto-increment
- To disable Identity identity & auto-increment (for some tests, which middle ware is still failing)
SET IDENTITY_INSERT gettableWithIdentity ON INSERT gettableWithIdentity (IdentityColumn, col2, col3, ...) VALUES (SetAnIdentityValue, col2value, col3value, ...) SET IDENTITY_INSERT gettableWithIdentity OFF