T-SQL find all identity columns
Here’s a T-SQL find all identity columns in a database. SELECT OBJECT_SCHEMA_NAME(tables.object_id, db_id()) AS SchemaName, tables.name As TableName, columns.name as ColumnName FROM sys.tables tables JOIN sys.columns columns ON tables.object_id=columns.object_id WHERE columns.is_identity=1 …
T-SQL find all identity columns Read More