Find which are all table has set identity.
- select COLUMN_NAME, TABLE_NAME
- from INFORMATION_SCHEMA.COLUMNS
- where TABLE_SCHEMA = 'dbo'
- and COLUMNPROPERTY(object_id(TABLE_NAME), COLUMN_NAME, 'IsIdentity') = 1
- order by TABLE_NAME
This code show how to find Which Are All Table has Set Identity