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.
| Author |
Topic |
|
aravindt77
Posting Yak Master
120 Posts |
Posted - 2007-08-28 : 04:34:42
|
| Hi All,how to find with tsql whether a column is IDENTITY column or notPlz do the needful ASAPThanks & RegardsAravind |
|
|
aravindt77
Posting Yak Master
120 Posts |
Posted - 2007-08-28 : 04:56:51
|
| Atlast I gt itSELECT IDENT_SEED(OBJECT_NAME(id)) AS seed, IDENT_INCR(OBJECT_NAME(id)) AS incr, OBJECT_NAME(id) AS tbl FROM syscolumns WHERE (status & 128) = 128 |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-08-28 : 05:14:49
|
this is the preffered way  select column_name from information_schema.columns where table_name = 'Employees' and columnproperty(object_id(table_name), column_name, 'IsIdentity') = 1 _______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
|
|
|