How to identify IDENTITY columns tables in a database
Here is a nifty query that will display all the tables and columns set as IDENTITY in a given database:
1 2 3 4 5 6 7 8 9 10 11 |
USE AdventureWorks2012 GO SELECT OBJECT_NAME(object_id) AS 'table_name', name AS 'column_name', seed_value, increment_value, last_value, is_not_for_replication FROM sys.identity_columns ORDER BY 1 |
Views –…
Read More