Monday, March 19, 2012

Changes in SQL2005 syscolumns table

It seems MS changed the way syscolumns table works. It appears this is no longer a table, but probably a systemview. Problem is, it looks like the autoval column is no longer working. I was using this to determine whether a column was an auto incrementing identity field. How should I go about determining a column's auto increment values?

Thanx,Since there is only one autoincrement column per table, you can use SELECT

IDENT_CURRENT('table_name')
wrote in message

news:8bf47d13-a87f-4304-b0d6-9eae8685e164@.discussions.microsoft.com...

> It seems MS changed the way syscolumns table works. It appears this is

> no longer a table, but probably a systemview. Problem is, it looks like

> the autoval column is no longer working. I was using this to determine

> whether a column was an auto incrementing identity field. How should I

> go about determining a column's auto increment values?

>

> Thanx,

>|||Have you tried COLUMNPROPERTY ( id , column , property )
using
IsIdentity

Tim S

No comments:

Post a Comment