Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE ident_test (
- test_id int IDENTITY(1000,10),
- other int
- )
- SELECT name, seed_value, increment_value
- FROM sys.identity_columns
- WHERE object_id = OBJECT_ID( 'ident_test' )
- SELECT c.name, i.seed_value, i.increment_value
- from sys.identity_columns i
- join sys.columns c
- ON i.object_id = c.object_id
- AND i.column_id = c.column_id
- SELECT c.name, i.seed_value, i.increment_value
- FROM sys.columns c
- INNER JOIN sys.identity_columns i
- ON i.object_id = c.object_id
- AND i.column_id = c.column_id
- INNER JOIN sys.tables t
- ON t.object_id = c.object_id
Add Comment
Please, Sign In to add comment