To get the list of tables having identity columns, we can use the INFORMATION_SCHEMA view of the SQL Server. Below is the script:
selectCOLUMN_NAME, TABLE_NAME
from
INFORMATION_SCHEMA.COLUMNS
whereTABLE_SCHEMA = 'dbo'
andCOLUMNPROPERTY(object_id(TABLE_NAME), COLUMN_NAME, 'IsIdentity') = 1
order
by TABLE_NAME
selectCOLUMN_NAME, TABLE_NAME
from
INFORMATION_SCHEMA.COLUMNS
whereTABLE_SCHEMA = 'dbo'
andCOLUMNPROPERTY(object_id(TABLE_NAME), COLUMN_NAME, 'IsIdentity') = 1
order
by TABLE_NAME