[NAME] AS [COLUMN_NAME],
[SEED_VALUE],
[INCREMENT_VALUE],
[LAST_VALUE],
[IS_NOT_FOR_REPLICATION]
FROM [SYS].[IDENTITY_COLUMNS]
ORDER BY [TABLE_NAME]
The result is a table with the following structure (column names shortened for space):
| TN | CN | SV | IV | LV | INF |
| TableName | KeyColumn | 1 | 1 | NULL | 0 |
| TableName2 | KeyColumn2 | 1 | 1 | NULL | 0 |
No comments:
Post a Comment