On Premise and Cloud Database Knowledge Base

Check Identity

This will list out identity columns in a Database. This is compatible to SQL 2005 only.


select a.name as ColumnName,b.name as tableName from sys.columns a, sys.tables b
where a.object_id = b.object_id and a.is_identity = 1

Leave a Reply

Leave a Reply

Your email address will not be published.