In SQL Server 2005, how can you easily determine which columns have the identity property set?
- Query sys.identity_columns for the rows.
- Query sys.columns.is_identity for a value of 1
Explanation: There is a table, sys.identity_columns that contains a row for each column in your database that has the identity property set. There is also a column called is_identity in the sys.columns view that contains a 1 if the column has the identity property set.
Note: The question of day is taken from SqlServerCentral.com. I want to compile selected QOD to share.