|
How do I list all of the identity columns in a SQL Server database |
|
|
|
|
Wednesday, 31 December 2008 |
|
SELECT OBJECT_NAME(OBJECT_ID) AS TABLENAME,
NAME AS COLUMNNAME,
SEED_VALUE,
INCREMENT_VALUE,
LAST_VALUE,
IS_NOT_FOR_REPLICATION
FROM SYS.IDENTITY_COLUMNS
ORDER BY 1
Thanks to the Edgewood Solutions Engineers at mssqltips.com - more information at http://www.mssqltips.com/tip.asp?tip=1123
|
|
Last Updated ( Wednesday, 31 December 2008 )
|