Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 how to find initial value of identity column

Author  Topic 

pvsramu
Starting Member

17 Posts

Posted - 2007-06-07 : 10:11:51
Hi,

How to find initial value of identity column programatically?

I am using DELETE command to delete all the rows in a table and setting the table's identity column to initial value. Problem is, for some of the tables, initial value is not 1.

Thanks,
Ramu

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-06-07 : 10:16:57
You can use IDENT_SEED() function to find out what initial value was set for an identity column of a table.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

pvsramu
Starting Member

17 Posts

Posted - 2007-06-07 : 10:29:21
Thanks Harsh.
Go to Top of Page
   

- Advertisement -