Where do I find the seed and increment values of the identity column in database.
If possile can u suggest query for that Pl.
Thanx in advance
-aliselect
object_name(id) as table_name,
name as column_name,
ident_seed(object_name(id)) as seed,
ident_incr(object_name(id)) as increment,
ident_current(object_name(id)) as last_identity
from
syscolumns
where
autoval is not null
and colstat & 1 = 1
and status & 0x80 = 0x80
and columnproperty(id,name,'IsIdentity') = 1
Hope, this helps.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment