Skip to content

Instantly share code, notes, and snippets.

@xivSolutions
Created March 16, 2014 13:19
Show Gist options
  • Save xivSolutions/9583088 to your computer and use it in GitHub Desktop.
Save xivSolutions/9583088 to your computer and use it in GitHub Desktop.
SQL Server Table -> Identity Columns
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment