If you’ve ever queried the sys.identity_columns
view in SQL Server, you’ll know that it returns a list of identity columns. It also returns the object_id
of the table, but not the table name or its schema.
You can use the code examples in this article to return the identity columns, along with their respective tables and schemas.