Below script is used to get the list of table which has identity column and their seed values and last identity value.
SELECT Object_name(obj.object_id) AS table_name, ic.NAME AS column_name, is_identity, seed_value, increment_value, last_value FROM sys.identity_columns ic JOIN sys.objects obj ON obj.object_id = ic.object_id WHERE obj.type = 'U'; |