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)
 Column with Identity property

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2007-10-22 : 18:28:32
Is there any sys table or information_schema view that gives the name of the column which has identity property associated with it.

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-10-22 : 18:37:49
You can use the IsProperty value of the COLUMNPROPERTY function. Check for IsProperty = 1 in the WHERE clause when you look through INFORMATION_SCHEMA.COLUMNS view.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -